cpumask: eliminate kernel-doc warnings

Message ID 20230713030832.17900-1-rdunlap@infradead.org
State New
Headers
Series cpumask: eliminate kernel-doc warnings |

Commit Message

Randy Dunlap July 13, 2023, 3:08 a.m. UTC
  Update lib/cpumask.c and <linux/cpumask.h> to fix all kernel-doc
warnings:

include/linux/cpumask.h:185: warning: Function parameter or member 'srcp1' not described in 'cpumask_first_and'
include/linux/cpumask.h:185: warning: Function parameter or member 'srcp2' not described in 'cpumask_first_and'
include/linux/cpumask.h:185: warning: Excess function parameter 'src1p' description in 'cpumask_first_and'
include/linux/cpumask.h:185: warning: Excess function parameter 'src2p' description in 'cpumask_first_and'

lib/cpumask.c:59: warning: Function parameter or member 'node' not described in 'alloc_cpumask_var_node'
lib/cpumask.c:169: warning: Function parameter or member 'src1p' not described in 'cpumask_any_and_distribute'
lib/cpumask.c:169: warning: Function parameter or member 'src2p' not described in 'cpumask_any_and_distribute'

Fixes: 7b4967c53204 ("cpumask: Add alloc_cpumask_var_node()")
Fixes: 839cad5fa54b ("cpumask: fix function description kernel-doc notation")
Fixes: 93ba139ba819 ("cpumask: use find_first_and_bit()")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 include/linux/cpumask.h |    8 ++++++--
 lib/cpumask.c           |    5 ++++-
 2 files changed, 10 insertions(+), 3 deletions(-)
  

Comments

Andy Shevchenko July 13, 2023, 4:52 p.m. UTC | #1
On Wed, Jul 12, 2023 at 08:08:32PM -0700, Randy Dunlap wrote:
> Update lib/cpumask.c and <linux/cpumask.h> to fix all kernel-doc
> warnings:
> 
> include/linux/cpumask.h:185: warning: Function parameter or member 'srcp1' not described in 'cpumask_first_and'
> include/linux/cpumask.h:185: warning: Function parameter or member 'srcp2' not described in 'cpumask_first_and'
> include/linux/cpumask.h:185: warning: Excess function parameter 'src1p' description in 'cpumask_first_and'
> include/linux/cpumask.h:185: warning: Excess function parameter 'src2p' description in 'cpumask_first_and'
> 
> lib/cpumask.c:59: warning: Function parameter or member 'node' not described in 'alloc_cpumask_var_node'
> lib/cpumask.c:169: warning: Function parameter or member 'src1p' not described in 'cpumask_any_and_distribute'
> lib/cpumask.c:169: warning: Function parameter or member 'src2p' not described in 'cpumask_any_and_distribute'

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for fixing this!

> Fixes: 7b4967c53204 ("cpumask: Add alloc_cpumask_var_node()")
> Fixes: 839cad5fa54b ("cpumask: fix function description kernel-doc notation")
> Fixes: 93ba139ba819 ("cpumask: use find_first_and_bit()")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
>  include/linux/cpumask.h |    8 ++++++--
>  lib/cpumask.c           |    5 ++++-
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff -- a/lib/cpumask.c b/lib/cpumask.c
> --- a/lib/cpumask.c
> +++ b/lib/cpumask.c
> @@ -45,6 +45,7 @@ EXPORT_SYMBOL(cpumask_next_wrap);
>   * alloc_cpumask_var_node - allocate a struct cpumask on a given node
>   * @mask: pointer to cpumask_var_t where the cpumask is returned
>   * @flags: GFP_ flags
> + * @node: memory node from which to allocate or %NUMA_NO_NODE
>   *
>   * Only defined when CONFIG_CPUMASK_OFFSTACK=y, otherwise is
>   * a nop returning a constant 1 (in <linux/cpumask.h>)
> @@ -157,7 +158,9 @@ EXPORT_SYMBOL(cpumask_local_spread);
>  static DEFINE_PER_CPU(int, distribute_cpu_mask_prev);
>  
>  /**
> - * cpumask_any_and_distribute - Return an arbitrary cpu within srcp1 & srcp2.
> + * cpumask_any_and_distribute - Return an arbitrary cpu within src1p & src2p.
> + * @src1p: first &cpumask for intersection
> + * @src2p: second &cpumask for intersection
>   *
>   * Iterated calls using the same srcp1 and srcp2 will be distributed within
>   * their intersection.
> diff -- a/include/linux/cpumask.h b/include/linux/cpumask.h
> --- a/include/linux/cpumask.h
> +++ b/include/linux/cpumask.h
> @@ -175,8 +175,8 @@ static inline unsigned int cpumask_first
>  
>  /**
>   * cpumask_first_and - return the first cpu from *srcp1 & *srcp2
> - * @src1p: the first input
> - * @src2p: the second input
> + * @srcp1: the first input
> + * @srcp2: the second input
>   *
>   * Returns >= nr_cpu_ids if no cpus set in both.  See also cpumask_next_and().
>   */
> @@ -1197,6 +1197,10 @@ cpumap_print_bitmask_to_buf(char *buf, c
>  /**
>   * cpumap_print_list_to_buf  - copies the cpumask into the buffer as
>   *	comma-separated list of cpus
> + * @buf: the buffer to copy into
> + * @mask: the cpumask to copy
> + * @off: in the string from which we are copying, we copy to @buf
> + * @count: the maximum number of bytes to print
>   *
>   * Everything is same with the above cpumap_print_bitmask_to_buf()
>   * except the print format.
  
Yury Norov July 13, 2023, 7:50 p.m. UTC | #2
On Wed, Jul 12, 2023 at 08:08:32PM -0700, Randy Dunlap wrote:
> Update lib/cpumask.c and <linux/cpumask.h> to fix all kernel-doc
> warnings:
> 
> include/linux/cpumask.h:185: warning: Function parameter or member 'srcp1' not described in 'cpumask_first_and'
> include/linux/cpumask.h:185: warning: Function parameter or member 'srcp2' not described in 'cpumask_first_and'
> include/linux/cpumask.h:185: warning: Excess function parameter 'src1p' description in 'cpumask_first_and'
> include/linux/cpumask.h:185: warning: Excess function parameter 'src2p' description in 'cpumask_first_and'
> 
> lib/cpumask.c:59: warning: Function parameter or member 'node' not described in 'alloc_cpumask_var_node'
> lib/cpumask.c:169: warning: Function parameter or member 'src1p' not described in 'cpumask_any_and_distribute'
> lib/cpumask.c:169: warning: Function parameter or member 'src2p' not described in 'cpumask_any_and_distribute'
> 
> Fixes: 7b4967c53204 ("cpumask: Add alloc_cpumask_var_node()")
> Fixes: 839cad5fa54b ("cpumask: fix function description kernel-doc notation")
> Fixes: 93ba139ba819 ("cpumask: use find_first_and_bit()")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Thanks, Randy! Applied.
  

Patch

diff -- a/lib/cpumask.c b/lib/cpumask.c
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -45,6 +45,7 @@  EXPORT_SYMBOL(cpumask_next_wrap);
  * alloc_cpumask_var_node - allocate a struct cpumask on a given node
  * @mask: pointer to cpumask_var_t where the cpumask is returned
  * @flags: GFP_ flags
+ * @node: memory node from which to allocate or %NUMA_NO_NODE
  *
  * Only defined when CONFIG_CPUMASK_OFFSTACK=y, otherwise is
  * a nop returning a constant 1 (in <linux/cpumask.h>)
@@ -157,7 +158,9 @@  EXPORT_SYMBOL(cpumask_local_spread);
 static DEFINE_PER_CPU(int, distribute_cpu_mask_prev);
 
 /**
- * cpumask_any_and_distribute - Return an arbitrary cpu within srcp1 & srcp2.
+ * cpumask_any_and_distribute - Return an arbitrary cpu within src1p & src2p.
+ * @src1p: first &cpumask for intersection
+ * @src2p: second &cpumask for intersection
  *
  * Iterated calls using the same srcp1 and srcp2 will be distributed within
  * their intersection.
diff -- a/include/linux/cpumask.h b/include/linux/cpumask.h
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -175,8 +175,8 @@  static inline unsigned int cpumask_first
 
 /**
  * cpumask_first_and - return the first cpu from *srcp1 & *srcp2
- * @src1p: the first input
- * @src2p: the second input
+ * @srcp1: the first input
+ * @srcp2: the second input
  *
  * Returns >= nr_cpu_ids if no cpus set in both.  See also cpumask_next_and().
  */
@@ -1197,6 +1197,10 @@  cpumap_print_bitmask_to_buf(char *buf, c
 /**
  * cpumap_print_list_to_buf  - copies the cpumask into the buffer as
  *	comma-separated list of cpus
+ * @buf: the buffer to copy into
+ * @mask: the cpumask to copy
+ * @off: in the string from which we are copying, we copy to @buf
+ * @count: the maximum number of bytes to print
  *
  * Everything is same with the above cpumap_print_bitmask_to_buf()
  * except the print format.