dm persistent data: Remove unused variable ret
PATCH 1/1 dm persistent data: Remove unused variable ret
Fix the following coccicheck warnings:
./drivers/md/persistent-data/dm-btree-spine.c:188:5-6: Unneeded
variable: "r". Return "0" on line 194.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/md/persistent-data/dm-btree-internal.h | 2 +- drivers/md/persistent-data/dm-btree-spine.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/md/persistent-data/dm-btree-internal.h +1 -1
@@ -83,7 +83,7 @@ struct shadow_spine { };void init_shadow_spine (struct shadow_spine *s,struct dm_btree_info *info); -int exit_shadow_spine (struct shadow_spine *s); +void exit_shadow_spine (struct shadow_spine *s);int shadow_step (struct shadow_spine *s,dm_block_t b,struct dm_btree_value_type *vt);
drivers/md/persistent-data/dm-btree-spine.c +2 -4
@@ -183,15 +183,13 @@ void init_shadow_spine(struct shadow_spine *s, struct dm_btree_info *info) s->count =0 ; } -int exit_shadow_spine (struct shadow_spine *s) +void exit_shadow_spine (struct shadow_spine *s) { -int r =0 , i; +int i;for (i =0 ; i < s->count; i++) {unlock_block (s->info, s->nodes[i]); } - -return r; } int shadow_step(struct shadow_spine *s, dm_block_t b,
Signature · 1 line
1.8.3.1