diff mbox series

[2/2] include/bitmap.h: add new functions to documentation

Message ID 20200304140920.6109-3-wsa+renesas@sang-engineering.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series include/bitmap.h: updates to docs | expand

Commit Message

Wolfram Sang March 4, 2020, 2:09 p.m. UTC
I found these functions only by chance although I was looking exactly
for something like them. So, add them to the list of functions to make
them more visible.

Fixes: e837dfde15a4 ("bitmap: genericize percpu bitmap region iterators")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Dennis Zhou <dennis@kernel.org>
---
 include/linux/bitmap.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Dennis Zhou March 4, 2020, 8:40 p.m. UTC | #1
Hi Wolfram,

On Wed, Mar 04, 2020 at 03:09:20PM +0100, Wolfram Sang wrote:
> I found these functions only by chance although I was looking exactly
> for something like them. So, add them to the list of functions to make
> them more visible.
> 
> Fixes: e837dfde15a4 ("bitmap: genericize percpu bitmap region iterators")
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Dennis Zhou <dennis@kernel.org>
> ---
>  include/linux/bitmap.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
> index 804600f7dc35..71ba0ffaa22a 100644
> --- a/include/linux/bitmap.h
> +++ b/include/linux/bitmap.h
> @@ -51,6 +51,12 @@
>   *  bitmap_clear(dst, pos, nbits)               Clear specified bit area
>   *  bitmap_find_next_zero_area(buf, len, pos, n, mask)  Find bit free area
>   *  bitmap_find_next_zero_area_off(buf, len, pos, n, mask, mask_off)  as above
> + *  bitmap_next_clear_region(map, &start, &end, nbits)  Find next cleared region
> + *  bitmap_next_set_region(map, &start, &end, nbits)  Find next set region
> + *  bitmap_for_each_clear_region(map, rs, re, start, end)
> + *  						Iterate over all cleared regions
> + *  bitmap_for_each_set_region(map, rs, re, start, end)
> + *  						Iterate over all set regions
>   *  bitmap_shift_right(dst, src, n, nbits)      *dst = *src >> n
>   *  bitmap_shift_left(dst, src, n, nbits)       *dst = *src << n
>   *  bitmap_cut(dst, src, first, n, nbits)       Cut n bits from first, copy rest
> -- 
> 2.20.1
> 

Ah thanks. That was a miss not adding the documentation. I can pick
these up unless Andrew would rather run them through his tree. I have a
few other miscellaneous documentation cleanups for percpu I need to run
anyway.

Acked-by: Dennis Zhou <dennis@kernel.org>

Thanks,
Dennis
Wolfram Sang March 5, 2020, 8:24 a.m. UTC | #2
> > I found these functions only by chance although I was looking exactly
> > for something like them. So, add them to the list of functions to make
> > them more visible.
> > 
> > Fixes: e837dfde15a4 ("bitmap: genericize percpu bitmap region iterators")
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > Cc: Dennis Zhou <dennis@kernel.org>
> 
> Ah thanks. That was a miss not adding the documentation. I can pick
> these up unless Andrew would rather run them through his tree. I have a
> few other miscellaneous documentation cleanups for percpu I need to run
> anyway.

That sounds like a good fit to me. Will you take both of the patches?

Thanks,

   Wolfram
Dennis Zhou March 5, 2020, 9:33 p.m. UTC | #3
On Thu, Mar 05, 2020 at 09:24:15AM +0100, Wolfram Sang wrote:
> 
> > > I found these functions only by chance although I was looking exactly
> > > for something like them. So, add them to the list of functions to make
> > > them more visible.
> > > 
> > > Fixes: e837dfde15a4 ("bitmap: genericize percpu bitmap region iterators")
> > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > Cc: Dennis Zhou <dennis@kernel.org>
> > 
> > Ah thanks. That was a miss not adding the documentation. I can pick
> > these up unless Andrew would rather run them through his tree. I have a
> > few other miscellaneous documentation cleanups for percpu I need to run
> > anyway.
> 
> That sounds like a good fit to me. Will you take both of the patches?
> 
> Thanks,
> 
>    Wolfram
> 

I've picked up both in percpu for-5.7.

Thanks,
Dennis
diff mbox series

Patch

diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 804600f7dc35..71ba0ffaa22a 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -51,6 +51,12 @@ 
  *  bitmap_clear(dst, pos, nbits)               Clear specified bit area
  *  bitmap_find_next_zero_area(buf, len, pos, n, mask)  Find bit free area
  *  bitmap_find_next_zero_area_off(buf, len, pos, n, mask, mask_off)  as above
+ *  bitmap_next_clear_region(map, &start, &end, nbits)  Find next cleared region
+ *  bitmap_next_set_region(map, &start, &end, nbits)  Find next set region
+ *  bitmap_for_each_clear_region(map, rs, re, start, end)
+ *  						Iterate over all cleared regions
+ *  bitmap_for_each_set_region(map, rs, re, start, end)
+ *  						Iterate over all set regions
  *  bitmap_shift_right(dst, src, n, nbits)      *dst = *src >> n
  *  bitmap_shift_left(dst, src, n, nbits)       *dst = *src << n
  *  bitmap_cut(dst, src, first, n, nbits)       Cut n bits from first, copy rest