Skip to content

Commit cf4ac2b

Browse files
ColinIanKingkdave
authored andcommitted
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] The code is a leftover from 6ded22c ("btrfs: reduce div64 calls by limiting the number of stripes of a chunk to u32") that converted div64 to normal division, it's the same but previous version did not trigger a warning. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 07a3bb9 commit cf4ac2b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/btrfs/scrub.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,6 @@ static int get_raid56_logic_offset(u64 physical, int num,
12621262

12631263
/* Work out the disk rotation on this stripe-set */
12641264
rot = stripe_nr % map->num_stripes;
1265-
stripe_nr /= map->num_stripes;
12661265
/* calculate which stripe this data locates */
12671266
rot += i;
12681267
stripe_index = rot % map->num_stripes;

0 commit comments

Comments
 (0)