All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] include/linux/find: Fix documentation
@ 2022-04-11 15:05 Anna-Maria Behnsen
  2022-04-11 15:48 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Anna-Maria Behnsen @ 2022-04-11 15:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Yury Norov, Andy Shevchenko, Rasmus Villemoes

The order of the arguments in function documentation doesn't fit the
implementation. Change the documentation so that it corresponds to the
code. This prevent people to get confused when reading the documentation.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
 include/linux/find.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/find.h b/include/linux/find.h
index 5bb6db213bcb..424ef67d4a42 100644
--- a/include/linux/find.h
+++ b/include/linux/find.h
@@ -21,8 +21,8 @@ extern unsigned long _find_last_bit(const unsigned long *addr, unsigned long siz
 /**
  * find_next_bit - find the next set bit in a memory region
  * @addr: The address to base the search on
- * @offset: The bitnumber to start searching at
  * @size: The bitmap size in bits
+ * @offset: The bitnumber to start searching at
  *
  * Returns the bit number for the next set bit
  * If no bits are set, returns @size.
@@ -50,8 +50,8 @@ unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
  * find_next_and_bit - find the next set bit in both memory regions
  * @addr1: The first address to base the search on
  * @addr2: The second address to base the search on
- * @offset: The bitnumber to start searching at
  * @size: The bitmap size in bits
+ * @offset: The bitnumber to start searching at
  *
  * Returns the bit number for the next set bit
  * If no bits are set, returns @size.
@@ -79,8 +79,8 @@ unsigned long find_next_and_bit(const unsigned long *addr1,
 /**
  * find_next_zero_bit - find the next cleared bit in a memory region
  * @addr: The address to base the search on
- * @offset: The bitnumber to start searching at
  * @size: The bitmap size in bits
+ * @offset: The bitnumber to start searching at
  *
  * Returns the bit number of the next zero bit
  * If no bits are zero, returns @size.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] include/linux/find: Fix documentation
  2022-04-11 15:05 [PATCH] include/linux/find: Fix documentation Anna-Maria Behnsen
@ 2022-04-11 15:48 ` Andy Shevchenko
  2022-04-11 17:20   ` Yury Norov
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2022-04-11 15:48 UTC (permalink / raw)
  To: Anna-Maria Behnsen
  Cc: linux-kernel, Thomas Gleixner, Yury Norov, Rasmus Villemoes

On Mon, Apr 11, 2022 at 05:05:55PM +0200, Anna-Maria Behnsen wrote:
> The order of the arguments in function documentation doesn't fit the
> implementation. Change the documentation so that it corresponds to the
> code. This prevent people to get confused when reading the documentation.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> ---
>  include/linux/find.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/find.h b/include/linux/find.h
> index 5bb6db213bcb..424ef67d4a42 100644
> --- a/include/linux/find.h
> +++ b/include/linux/find.h
> @@ -21,8 +21,8 @@ extern unsigned long _find_last_bit(const unsigned long *addr, unsigned long siz
>  /**
>   * find_next_bit - find the next set bit in a memory region
>   * @addr: The address to base the search on
> - * @offset: The bitnumber to start searching at
>   * @size: The bitmap size in bits
> + * @offset: The bitnumber to start searching at
>   *
>   * Returns the bit number for the next set bit
>   * If no bits are set, returns @size.
> @@ -50,8 +50,8 @@ unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
>   * find_next_and_bit - find the next set bit in both memory regions
>   * @addr1: The first address to base the search on
>   * @addr2: The second address to base the search on
> - * @offset: The bitnumber to start searching at
>   * @size: The bitmap size in bits
> + * @offset: The bitnumber to start searching at
>   *
>   * Returns the bit number for the next set bit
>   * If no bits are set, returns @size.
> @@ -79,8 +79,8 @@ unsigned long find_next_and_bit(const unsigned long *addr1,
>  /**
>   * find_next_zero_bit - find the next cleared bit in a memory region
>   * @addr: The address to base the search on
> - * @offset: The bitnumber to start searching at
>   * @size: The bitmap size in bits
> + * @offset: The bitnumber to start searching at
>   *
>   * Returns the bit number of the next zero bit
>   * If no bits are zero, returns @size.
> -- 
> 2.20.1
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] include/linux/find: Fix documentation
  2022-04-11 15:48 ` Andy Shevchenko
@ 2022-04-11 17:20   ` Yury Norov
  0 siblings, 0 replies; 3+ messages in thread
From: Yury Norov @ 2022-04-11 17:20 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Anna-Maria Behnsen, linux-kernel, Thomas Gleixner, Rasmus Villemoes

On Mon, Apr 11, 2022 at 8:52 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Mon, Apr 11, 2022 at 05:05:55PM +0200, Anna-Maria Behnsen wrote:
> > The order of the arguments in function documentation doesn't fit the
> > implementation. Change the documentation so that it corresponds to the
> > code. This prevent people to get confused when reading the documentation.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks, applied here:
https://github.com/norov/linux.git
branch: bitmap-for-next


> > Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> > ---
> >  include/linux/find.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/find.h b/include/linux/find.h
> > index 5bb6db213bcb..424ef67d4a42 100644
> > --- a/include/linux/find.h
> > +++ b/include/linux/find.h
> > @@ -21,8 +21,8 @@ extern unsigned long _find_last_bit(const unsigned long *addr, unsigned long siz
> >  /**
> >   * find_next_bit - find the next set bit in a memory region
> >   * @addr: The address to base the search on
> > - * @offset: The bitnumber to start searching at
> >   * @size: The bitmap size in bits
> > + * @offset: The bitnumber to start searching at
> >   *
> >   * Returns the bit number for the next set bit
> >   * If no bits are set, returns @size.
> > @@ -50,8 +50,8 @@ unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
> >   * find_next_and_bit - find the next set bit in both memory regions
> >   * @addr1: The first address to base the search on
> >   * @addr2: The second address to base the search on
> > - * @offset: The bitnumber to start searching at
> >   * @size: The bitmap size in bits
> > + * @offset: The bitnumber to start searching at
> >   *
> >   * Returns the bit number for the next set bit
> >   * If no bits are set, returns @size.
> > @@ -79,8 +79,8 @@ unsigned long find_next_and_bit(const unsigned long *addr1,
> >  /**
> >   * find_next_zero_bit - find the next cleared bit in a memory region
> >   * @addr: The address to base the search on
> > - * @offset: The bitnumber to start searching at
> >   * @size: The bitmap size in bits
> > + * @offset: The bitnumber to start searching at
> >   *
> >   * Returns the bit number of the next zero bit
> >   * If no bits are zero, returns @size.
> > --
> > 2.20.1
> >
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-11 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 15:05 [PATCH] include/linux/find: Fix documentation Anna-Maria Behnsen
2022-04-11 15:48 ` Andy Shevchenko
2022-04-11 17:20   ` Yury Norov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.