Skip to content

Commit

Permalink
dm cache metadata: remove unnecessary variable in __dump_mapping
Browse files Browse the repository at this point in the history
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@vivo.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
  • Loading branch information
Guo Zhengkui authored and Mike Snitzer committed May 9, 2022
1 parent c06dfd1 commit d254c36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/md/dm-cache-metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,15 +1509,14 @@ 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;

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

return r;
return 0;
}

static int __dump_mappings(struct dm_cache_metadata *cmd)
Expand Down

0 comments on commit d254c36

Please sign in to comment.