diff mbox series

[07/10] of: fdt: Demote kernel-doc abuses

Message ID 20210312110758.2220959-8-lee.jones@linaro.org
State Superseded
Headers show
Series Rid W=1 warnings from OF | expand

Commit Message

Lee Jones March 12, 2021, 11:07 a.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/of/fdt.c:478: warning: Function parameter or member 'node' not described in '__reserved_mem_reserve_reg'
 drivers/of/fdt.c:478: warning: Function parameter or member 'uname' not described in '__reserved_mem_reserve_reg'
 drivers/of/fdt.c:525: warning: Function parameter or member 'node' not described in '__reserved_mem_check_root'
 drivers/of/fdt.c:547: warning: Function parameter or member 'node' not described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: Function parameter or member 'uname' not described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: Function parameter or member 'depth' not described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: Function parameter or member 'data' not described in '__fdt_scan_reserved_mem'
 drivers/of/fdt.c:547: warning: expecting prototype for fdt_scan_reserved_mem(). Prototype was for __fdt_scan_reserved_mem() instead
 drivers/of/fdt.c:663: warning: Function parameter or member 'parent' not described in 'of_scan_flat_dt_subnodes'
 drivers/of/fdt.c:708: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_prop'
 drivers/of/fdt.c:708: warning: Function parameter or member 'name' not described in 'of_get_flat_dt_prop'
 drivers/of/fdt.c:708: warning: Function parameter or member 'size' not described in 'of_get_flat_dt_prop'
 drivers/of/fdt.c:758: warning: Function parameter or member 'node' not described in 'of_flat_dt_match'
 drivers/of/fdt.c:758: warning: Function parameter or member 'compat' not described in 'of_flat_dt_match'
 drivers/of/fdt.c:778: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_phandle'
 drivers/of/fdt.c:778: warning: expecting prototype for of_get_flat_dt_prop(). Prototype was for of_get_flat_dt_phandle() instead
 drivers/of/fdt.c:955: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:955: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:955: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:955: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_root'
 drivers/of/fdt.c:991: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_memory'
 drivers/of/fdt.c:991: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_memory'
 drivers/of/fdt.c:991: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_memory'
 drivers/of/fdt.c:991: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_memory'

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: benh@kernel.crashing.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/of/fdt.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

-- 
2.27.0

Comments

Rob Herring March 12, 2021, 3:01 p.m. UTC | #1
On Fri, Mar 12, 2021 at 4:08 AM Lee Jones <lee.jones@linaro.org> wrote:
>

> Fixes the following W=1 kernel build warning(s):

>

>  drivers/of/fdt.c:478: warning: Function parameter or member 'node' not described in '__reserved_mem_reserve_reg'

>  drivers/of/fdt.c:478: warning: Function parameter or member 'uname' not described in '__reserved_mem_reserve_reg'

>  drivers/of/fdt.c:525: warning: Function parameter or member 'node' not described in '__reserved_mem_check_root'

>  drivers/of/fdt.c:547: warning: Function parameter or member 'node' not described in '__fdt_scan_reserved_mem'

>  drivers/of/fdt.c:547: warning: Function parameter or member 'uname' not described in '__fdt_scan_reserved_mem'

>  drivers/of/fdt.c:547: warning: Function parameter or member 'depth' not described in '__fdt_scan_reserved_mem'

>  drivers/of/fdt.c:547: warning: Function parameter or member 'data' not described in '__fdt_scan_reserved_mem'

>  drivers/of/fdt.c:547: warning: expecting prototype for fdt_scan_reserved_mem(). Prototype was for __fdt_scan_reserved_mem() instead

>  drivers/of/fdt.c:663: warning: Function parameter or member 'parent' not described in 'of_scan_flat_dt_subnodes'

>  drivers/of/fdt.c:708: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_prop'

>  drivers/of/fdt.c:708: warning: Function parameter or member 'name' not described in 'of_get_flat_dt_prop'

>  drivers/of/fdt.c:708: warning: Function parameter or member 'size' not described in 'of_get_flat_dt_prop'

>  drivers/of/fdt.c:758: warning: Function parameter or member 'node' not described in 'of_flat_dt_match'

>  drivers/of/fdt.c:758: warning: Function parameter or member 'compat' not described in 'of_flat_dt_match'

>  drivers/of/fdt.c:778: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_phandle'

>  drivers/of/fdt.c:778: warning: expecting prototype for of_get_flat_dt_prop(). Prototype was for of_get_flat_dt_phandle() instead

>  drivers/of/fdt.c:955: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_root'

>  drivers/of/fdt.c:955: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_root'

>  drivers/of/fdt.c:955: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_root'

>  drivers/of/fdt.c:955: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_root'

>  drivers/of/fdt.c:991: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_memory'

>  drivers/of/fdt.c:991: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_memory'

>  drivers/of/fdt.c:991: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_memory'

>  drivers/of/fdt.c:991: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_memory'

>

> Cc: Rob Herring <robh+dt@kernel.org>

> Cc: Frank Rowand <frowand.list@gmail.com>

> Cc: benh@kernel.crashing.org

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---

>  drivers/of/fdt.c | 19 ++++++++++---------

>  1 file changed, 10 insertions(+), 9 deletions(-)

>

> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c

> index dcc1dd96911a9..1fb3348eb9516 100644

> --- a/drivers/of/fdt.c

> +++ b/drivers/of/fdt.c

> @@ -470,7 +470,7 @@ void *initial_boot_params __ro_after_init;

>

>  static u32 of_fdt_crc32;

>

> -/**

> +/*

>   * __reserved_mem_reserve_reg() - reserve all memory described in 'reg' property

>   */

>  static int __init __reserved_mem_reserve_reg(unsigned long node,

> @@ -516,7 +516,7 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,

>         return 0;

>  }

>

> -/**

> +/*

>   * __reserved_mem_check_root() - check if #size-cells, #address-cells provided

>   * in /reserved-memory matches the values supported by the current implementation,

>   * also check if ranges property has been provided

> @@ -539,7 +539,7 @@ static int __init __reserved_mem_check_root(unsigned long node)

>         return 0;

>  }

>

> -/**

> +/*

>   * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory


This is still wrong. Should be __fdt_scan_reserved_mem.

>   */

>  static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,

> @@ -650,6 +650,7 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node,

>

>  /**

>   * of_scan_flat_dt_subnodes - scan sub-nodes of a node call callback on each.

> + * @parent: parent node

>   * @it: callback function

>   * @data: context data pointer

>   *

> @@ -689,7 +690,7 @@ int __init of_get_flat_dt_subnode_by_name(unsigned long node, const char *uname)

>         return fdt_subnode_offset(initial_boot_params, node, uname);

>  }

>

> -/**

> +/*

>   * of_get_flat_dt_root - find the root node in the flat blob

>   */

>  unsigned long __init of_get_flat_dt_root(void)

> @@ -697,7 +698,7 @@ unsigned long __init of_get_flat_dt_root(void)

>         return 0;

>  }

>

> -/**

> +/*

>   * of_get_flat_dt_prop - Given a node in the flat blob, return the property ptr

>   *

>   * This function can be used within scan_flattened_dt callback to get

> @@ -751,7 +752,7 @@ int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)

>         return of_fdt_is_compatible(initial_boot_params, node, compat);

>  }

>

> -/**

> +/*

>   * of_flat_dt_match - Return true if node matches a list of compatible values

>   */

>  static int __init of_flat_dt_match(unsigned long node, const char *const *compat)

> @@ -771,7 +772,7 @@ static int __init of_flat_dt_match(unsigned long node, const char *const *compat

>         return score;

>  }

>

> -/**

> +/*

>   * of_get_flat_dt_prop - Given a node in the flat blob, return the phandle


This one too.

>   */

>  uint32_t __init of_get_flat_dt_phandle(unsigned long node)

> @@ -947,7 +948,7 @@ int __init early_init_dt_scan_chosen_stdout(void)

>  }

>  #endif

>

> -/**

> +/*

>   * early_init_dt_scan_root - fetch the top level address and size cells

>   */

>  int __init early_init_dt_scan_root(unsigned long node, const char *uname,

> @@ -983,7 +984,7 @@ u64 __init dt_mem_next_cell(int s, const __be32 **cellp)

>         return of_read_number(p, s);

>  }

>

> -/**

> +/*

>   * early_init_dt_scan_memory - Look for and parse memory nodes

>   */

>  int __init early_init_dt_scan_memory(unsigned long node, const char *uname,

> --

> 2.27.0

>
Lee Jones March 12, 2021, 3:09 p.m. UTC | #2
On Fri, 12 Mar 2021, Rob Herring wrote:

> On Fri, Mar 12, 2021 at 4:08 AM Lee Jones <lee.jones@linaro.org> wrote:

> >

> > Fixes the following W=1 kernel build warning(s):

> >

> >  drivers/of/fdt.c:478: warning: Function parameter or member 'node' not described in '__reserved_mem_reserve_reg'

> >  drivers/of/fdt.c:478: warning: Function parameter or member 'uname' not described in '__reserved_mem_reserve_reg'

> >  drivers/of/fdt.c:525: warning: Function parameter or member 'node' not described in '__reserved_mem_check_root'

> >  drivers/of/fdt.c:547: warning: Function parameter or member 'node' not described in '__fdt_scan_reserved_mem'

> >  drivers/of/fdt.c:547: warning: Function parameter or member 'uname' not described in '__fdt_scan_reserved_mem'

> >  drivers/of/fdt.c:547: warning: Function parameter or member 'depth' not described in '__fdt_scan_reserved_mem'

> >  drivers/of/fdt.c:547: warning: Function parameter or member 'data' not described in '__fdt_scan_reserved_mem'

> >  drivers/of/fdt.c:547: warning: expecting prototype for fdt_scan_reserved_mem(). Prototype was for __fdt_scan_reserved_mem() instead

> >  drivers/of/fdt.c:663: warning: Function parameter or member 'parent' not described in 'of_scan_flat_dt_subnodes'

> >  drivers/of/fdt.c:708: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_prop'

> >  drivers/of/fdt.c:708: warning: Function parameter or member 'name' not described in 'of_get_flat_dt_prop'

> >  drivers/of/fdt.c:708: warning: Function parameter or member 'size' not described in 'of_get_flat_dt_prop'

> >  drivers/of/fdt.c:758: warning: Function parameter or member 'node' not described in 'of_flat_dt_match'

> >  drivers/of/fdt.c:758: warning: Function parameter or member 'compat' not described in 'of_flat_dt_match'

> >  drivers/of/fdt.c:778: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_phandle'

> >  drivers/of/fdt.c:778: warning: expecting prototype for of_get_flat_dt_prop(). Prototype was for of_get_flat_dt_phandle() instead

> >  drivers/of/fdt.c:955: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_root'

> >  drivers/of/fdt.c:955: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_root'

> >  drivers/of/fdt.c:955: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_root'

> >  drivers/of/fdt.c:955: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_root'

> >  drivers/of/fdt.c:991: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_memory'

> >  drivers/of/fdt.c:991: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_memory'

> >  drivers/of/fdt.c:991: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_memory'

> >  drivers/of/fdt.c:991: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_memory'

> >

> > Cc: Rob Herring <robh+dt@kernel.org>

> > Cc: Frank Rowand <frowand.list@gmail.com>

> > Cc: benh@kernel.crashing.org

> > Cc: devicetree@vger.kernel.org

> > Signed-off-by: Lee Jones <lee.jones@linaro.org>

> > ---

> >  drivers/of/fdt.c | 19 ++++++++++---------

> >  1 file changed, 10 insertions(+), 9 deletions(-)

> >

> > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c

> > index dcc1dd96911a9..1fb3348eb9516 100644

> > --- a/drivers/of/fdt.c

> > +++ b/drivers/of/fdt.c

> > @@ -470,7 +470,7 @@ void *initial_boot_params __ro_after_init;

> >

> >  static u32 of_fdt_crc32;

> >

> > -/**

> > +/*

> >   * __reserved_mem_reserve_reg() - reserve all memory described in 'reg' property

> >   */

> >  static int __init __reserved_mem_reserve_reg(unsigned long node,

> > @@ -516,7 +516,7 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,

> >         return 0;

> >  }

> >

> > -/**

> > +/*

> >   * __reserved_mem_check_root() - check if #size-cells, #address-cells provided

> >   * in /reserved-memory matches the values supported by the current implementation,

> >   * also check if ranges property has been provided

> > @@ -539,7 +539,7 @@ static int __init __reserved_mem_check_root(unsigned long node)

> >         return 0;

> >  }

> >

> > -/**

> > +/*

> >   * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory

> 

> This is still wrong. Should be __fdt_scan_reserved_mem.


Ah, the warning went away because I demoted it.

Will fix.  The others too.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox series

Patch

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index dcc1dd96911a9..1fb3348eb9516 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -470,7 +470,7 @@  void *initial_boot_params __ro_after_init;
 
 static u32 of_fdt_crc32;
 
-/**
+/*
  * __reserved_mem_reserve_reg() - reserve all memory described in 'reg' property
  */
 static int __init __reserved_mem_reserve_reg(unsigned long node,
@@ -516,7 +516,7 @@  static int __init __reserved_mem_reserve_reg(unsigned long node,
 	return 0;
 }
 
-/**
+/*
  * __reserved_mem_check_root() - check if #size-cells, #address-cells provided
  * in /reserved-memory matches the values supported by the current implementation,
  * also check if ranges property has been provided
@@ -539,7 +539,7 @@  static int __init __reserved_mem_check_root(unsigned long node)
 	return 0;
 }
 
-/**
+/*
  * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory
  */
 static int __init __fdt_scan_reserved_mem(unsigned long node, const char *uname,
@@ -650,6 +650,7 @@  int __init of_scan_flat_dt(int (*it)(unsigned long node,
 
 /**
  * of_scan_flat_dt_subnodes - scan sub-nodes of a node call callback on each.
+ * @parent: parent node
  * @it: callback function
  * @data: context data pointer
  *
@@ -689,7 +690,7 @@  int __init of_get_flat_dt_subnode_by_name(unsigned long node, const char *uname)
 	return fdt_subnode_offset(initial_boot_params, node, uname);
 }
 
-/**
+/*
  * of_get_flat_dt_root - find the root node in the flat blob
  */
 unsigned long __init of_get_flat_dt_root(void)
@@ -697,7 +698,7 @@  unsigned long __init of_get_flat_dt_root(void)
 	return 0;
 }
 
-/**
+/*
  * of_get_flat_dt_prop - Given a node in the flat blob, return the property ptr
  *
  * This function can be used within scan_flattened_dt callback to get
@@ -751,7 +752,7 @@  int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)
 	return of_fdt_is_compatible(initial_boot_params, node, compat);
 }
 
-/**
+/*
  * of_flat_dt_match - Return true if node matches a list of compatible values
  */
 static int __init of_flat_dt_match(unsigned long node, const char *const *compat)
@@ -771,7 +772,7 @@  static int __init of_flat_dt_match(unsigned long node, const char *const *compat
 	return score;
 }
 
-/**
+/*
  * of_get_flat_dt_prop - Given a node in the flat blob, return the phandle
  */
 uint32_t __init of_get_flat_dt_phandle(unsigned long node)
@@ -947,7 +948,7 @@  int __init early_init_dt_scan_chosen_stdout(void)
 }
 #endif
 
-/**
+/*
  * early_init_dt_scan_root - fetch the top level address and size cells
  */
 int __init early_init_dt_scan_root(unsigned long node, const char *uname,
@@ -983,7 +984,7 @@  u64 __init dt_mem_next_cell(int s, const __be32 **cellp)
 	return of_read_number(p, s);
 }
 
-/**
+/*
  * early_init_dt_scan_memory - Look for and parse memory nodes
  */
 int __init early_init_dt_scan_memory(unsigned long node, const char *uname,