Skip to content

Commit d254c36

Browse files
Guo ZhengkuiMike Snitzer
authored andcommitted
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: Guo Zhengkui <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent c06dfd1 commit d254c36

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/md/dm-cache-metadata.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,15 +1509,14 @@ int dm_cache_load_mappings(struct dm_cache_metadata *cmd,
15091509

15101510
static int __dump_mapping(void *context, uint64_t cblock, void *leaf)
15111511
{
1512-
int r = 0;
15131512
__le64 value;
15141513
dm_oblock_t oblock;
15151514
unsigned flags;
15161515

15171516
memcpy(&value, leaf, sizeof(value));
15181517
unpack_value(value, &oblock, &flags);
15191518

1520-
return r;
1519+
return 0;
15211520
}
15221521

15231522
static int __dump_mappings(struct dm_cache_metadata *cmd)

0 commit comments

Comments
 (0)