From cf4ac2b9049be459dfbaddbeb9322366f1ac2dc6 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 21 Jun 2023 14:09:37 +0100 Subject: 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 6ded22c1bfe6 ("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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/scrub.c | 1 - 1 file changed, 1 deletion(-) (limited to 'fs/btrfs/scrub.c') diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 7289f5bff397..fe1c5bc7f601 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -1262,7 +1262,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; -- cgit v1.2.3-73-gaa49b