[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220504162827.9429-1-guozhengkui@vivo.com>
Date: Thu, 5 May 2022 00:28:26 +0800
From: Guo Zhengkui <guozhengkui@...o.com>
To: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...nel.org>, dm-devel@...hat.com,
linux-kernel@...r.kernel.org
Cc: zhengkui_guo@...look.com, Guo Zhengkui <guozhengkui@...o.com>
Subject: [PATCH] dm cache metadata: fix returnvar.cocci warning
Fix the following coccicheck warning:
drivers/md/dm-cache-metadata.c:1512:5-6: Unneeded variable: "r".
Return "0" on line 1520.
Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
drivers/md/dm-cache-metadata.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c
index 2874f222c313..ab13b7380265 100644
--- a/drivers/md/dm-cache-metadata.c
+++ b/drivers/md/dm-cache-metadata.c
@@ -1509,7 +1509,6 @@ int dm_cache_load_mappings(struct dm_cache_metadata *cmd,
static int __dump_mapping(void *context, uint64_t cblock, void *leaf)
{
- int r = 0;
__le64 value;
dm_oblock_t oblock;
unsigned flags;
@@ -1517,7 +1516,7 @@ static int __dump_mapping(void *context, uint64_t cblock, void *leaf)
memcpy(&value, leaf, sizeof(value));
unpack_value(value, &oblock, &flags);
- return r;
+ return 0;
}
static int __dump_mappings(struct dm_cache_metadata *cmd)
--
2.20.1
Powered by blists - more mailing lists