Commit d254c369 authored by Guo Zhengkui's avatar Guo Zhengkui Committed by Mike Snitzer

dm cache metadata: remove unnecessary variable in __dump_mapping

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: default avatarGuo Zhengkui <guozhengkui@vivo.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent c06dfd12
...@@ -1509,7 +1509,6 @@ int dm_cache_load_mappings(struct dm_cache_metadata *cmd, ...@@ -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) static int __dump_mapping(void *context, uint64_t cblock, void *leaf)
{ {
int r = 0;
__le64 value; __le64 value;
dm_oblock_t oblock; dm_oblock_t oblock;
unsigned flags; unsigned flags;
...@@ -1517,7 +1516,7 @@ static int __dump_mapping(void *context, uint64_t cblock, void *leaf) ...@@ -1517,7 +1516,7 @@ static int __dump_mapping(void *context, uint64_t cblock, void *leaf)
memcpy(&value, leaf, sizeof(value)); memcpy(&value, leaf, sizeof(value));
unpack_value(value, &oblock, &flags); unpack_value(value, &oblock, &flags);
return r; return 0;
} }
static int __dump_mappings(struct dm_cache_metadata *cmd) static int __dump_mappings(struct dm_cache_metadata *cmd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment