btrfs: scrub: remove redundant division of stripe_nr
Subsystems (2)
PATCH 1/1 btrfs: scrub: remove redundant division of stripe_nr
Variable stripe_nr is being divided by map->num_stripes however the result is never read. The division and assignment are redundant and can be removed. Cleans up clang scan build warning:
fs/btrfs/scrub.c:1264:3: warning: Value stored to 'stripe_nr' is never read [deadcode.DeadStores]
Signed-off-by Colin Ian King <[email protected]>
--- fs/btrfs/scrub.c | 1 - 1 file changed, 1 deletion(-)
fs/btrfs/scrub.c +0 -1
@@ -1261,7 +1261,6 @@ static int get_raid56_logic_offset(u64 physical, int num,/* Work out the disk rotation on this stripe-set */ rot = stripe_nr % map->num_stripes; - stripe_nr /= map->num_stripes;/* calculate which stripe this data locates */ rot += i; stripe_index = rot % map->num_stripes;
Signature · 1 line
2.39.2
Quoted 8 lines · Colin Ian King
Variable
stripe_nris being divided bymap->num_stripeshowever the result is never read. The division and assignment are redundant and can be removed. Cleans up clang scan build warning:
fs/btrfs/scrub.c:1264:3: warning: Value stored to 'stripe_nr' is never read [deadcode.DeadStores]Signed-off-by Colin Ian King <[email protected]>
Added to misc-next, thanks.