[PATCH] bitmap: drop bitmap_next_set_region()

Yury Norov posted 1 patch 5 days, 14 hours ago
include/linux/bitmap.h | 8 --------
1 file changed, 8 deletions(-)
[PATCH] bitmap: drop bitmap_next_set_region()
Posted by Yury Norov 5 days, 14 hours ago
The function is a dead code. Drop it.

Signed-off-by: Yury Norov <ynorov@nvidia.com>
---
 include/linux/bitmap.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 8854acf77869..a967e1f7542b 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -697,14 +697,6 @@ void bitmap_gather(unsigned long *dst, const unsigned long *src,
 		__assign_bit(n++, dst, test_bit(bit, src));
 }
 
-static __always_inline
-void bitmap_next_set_region(unsigned long *bitmap, unsigned int *rs,
-			    unsigned int *re, unsigned int end)
-{
-	*rs = find_next_bit(bitmap, end, *rs);
-	*re = find_next_zero_bit(bitmap, end, *rs + 1);
-}
-
 /**
  * bitmap_release_region - release allocated bitmap region
  *	@bitmap: array of unsigned longs corresponding to the bitmap
-- 
2.53.0
Re: [PATCH] bitmap: drop bitmap_next_set_region()
Posted by Yury Norov 3 days, 7 hours ago
OK, added in bitmap-for-next.

On Sun, Jul 19, 2026 at 08:27:27AM -0400, Yury Norov wrote:
> The function is a dead code. Drop it.
> 
> Signed-off-by: Yury Norov <ynorov@nvidia.com>
> ---
>  include/linux/bitmap.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
> index 8854acf77869..a967e1f7542b 100644
> --- a/include/linux/bitmap.h
> +++ b/include/linux/bitmap.h
> @@ -697,14 +697,6 @@ void bitmap_gather(unsigned long *dst, const unsigned long *src,
>  		__assign_bit(n++, dst, test_bit(bit, src));
>  }
>  
> -static __always_inline
> -void bitmap_next_set_region(unsigned long *bitmap, unsigned int *rs,
> -			    unsigned int *re, unsigned int end)
> -{
> -	*rs = find_next_bit(bitmap, end, *rs);
> -	*re = find_next_zero_bit(bitmap, end, *rs + 1);
> -}
> -
>  /**
>   * bitmap_release_region - release allocated bitmap region
>   *	@bitmap: array of unsigned longs corresponding to the bitmap
> -- 
> 2.53.0