* [PATCH -next] btrfs: Remove the unused function scrub_calc_parity_bitmap_len()
@ 2022-06-08 1:21 Yang Li
2022-06-08 21:20 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2022-06-08 1:21 UTC (permalink / raw)
To: clm; +Cc: josef, dsterba, linux-btrfs, linux-kernel, Yang Li, Abaci Robot
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'
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
fs/btrfs/scrub.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 46cac7c7f292..db700e6ec5a9 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -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);
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] btrfs: Remove the unused function scrub_calc_parity_bitmap_len()
2022-06-08 1:21 [PATCH -next] btrfs: Remove the unused function scrub_calc_parity_bitmap_len() Yang Li
@ 2022-06-08 21:20 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2022-06-08 21:20 UTC (permalink / raw)
To: Yang Li; +Cc: clm, josef, dsterba, linux-btrfs, linux-kernel, Abaci Robot
On Wed, Jun 08, 2022 at 09:21:58AM +0800, Yang Li wrote:
> 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'
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Thanks, fix folded to the patch as it's still in the development branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-08 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 1:21 [PATCH -next] btrfs: Remove the unused function scrub_calc_parity_bitmap_len() Yang Li
2022-06-08 21:20 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox