Skip to contentSkip to conversation

btrfs: Remove the unused function scrub_calc_parity_bitmap_len()

PATCH In review Yang Li 2 participants 2 messages Jun 8, 2022 Btrfs file system

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 btrfs: Remove the unused function scrub_calc_parity_bitmap_len()

bitmap_len = scrub_calc_parity_bitmap_len(), the only call point of this function has been deleted, so it should also be removed.

Fix the following W=1 kernel warning:
fs/btrfs/scrub.c:2857:19: warning: unused function 'scrub_calc_parity_bitmap_len'

---
 fs/btrfs/scrub.c | 5 -----
 1 file changed, 5 deletions(-)
fs/btrfs/scrub.c +0 -5
index 46cac7c7f292..db700e6ec5a9 100644
@@ -2854,11 +2854,6 @@ static void scrub_parity_check_and_repair(struct scrub_parity *sparity)
 	scrub_free_parity(sparity);
 }
 
-static inline int scrub_calc_parity_bitmap_len(int nsectors)
-{
-	return DIV_ROUND_UP(nsectors, BITS_PER_LONG) * sizeof(long);
-}
-
 static void scrub_parity_get(struct scrub_parity *sparity)
 {
 	refcount_inc(&sparity->refs);
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw
Quoted 8 lines · Yang Li

bitmap_len = scrub_calc_parity_bitmap_len(), the only call point of this function has been deleted, so it should also be removed.

Fix the following W=1 kernel warning:
fs/btrfs/scrub.c:2857:19: warning: unused function 'scrub_calc_parity_bitmap_len'

Thanks, fix folded to the patch as it's still in the development branch.