diff mbox series

[07/10] of: Correct comments for of_alias_scan()

Message ID 20241206-of_core_fix-v1-7-dc28ed56bec3@quicinc.com
State Changes Requested
Headers show
Series of: fix bugs and improve codes | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Zijun Hu Dec. 6, 2024, 12:52 a.m. UTC
From: Zijun Hu <quic_zijuhu@quicinc.com>

Correct of_alias_scan() comments by:

- Replace /* with /** to start comments since it is not a API.
- Delete return value descriptions since it is a void function.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 drivers/of/base.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Rob Herring Dec. 9, 2024, 1:20 p.m. UTC | #1
On Thu, Dec 5, 2024 at 6:53 PM Zijun Hu <zijun_hu@icloud.com> wrote:
>
> From: Zijun Hu <quic_zijuhu@quicinc.com>
>
> Correct of_alias_scan() comments by:
>
> - Replace /* with /** to start comments since it is not a API.

But it is because it's in of.h. However, you are correct in that it
has no external callers. So please move the declaration to
of_private.h.

> - Delete return value descriptions since it is a void function.
>
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---
>  drivers/of/base.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 1c62cda4ebcd9e3dc5f91d10fa68f975226693dd..33abb6227468c03fd191201aa2bbe05a41fdd9f4 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -1812,14 +1812,13 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np,
>                  ap->alias, ap->stem, ap->id, np);
>  }
>
> -/**
> +/*
>   * of_alias_scan - Scan all properties of the 'aliases' node
>   * @dt_alloc:  An allocator that provides a virtual address to memory
>   *             for storing the resulting tree
>   *
>   * The function scans all the properties of the 'aliases' node and populates
> - * the global lookup table with the properties.  It returns the
> - * number of alias properties found, or an error code in case of failure.
> + * the global lookup table with the properties.
>   */
>  void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
>  {
>
> --
> 2.34.1
>
>
Zijun Hu Dec. 9, 2024, 1:41 p.m. UTC | #2
On 2024/12/9 21:20, Rob Herring wrote:
>> - Replace /* with /** to start comments since it is not a API.
> But it is because it's in of.h. However, you are correct in that it
> has no external callers. So please move the declaration to
> of_private.h.
> 

thank you Rob for code review.
let me do it in next revision.

>> - Delete return value descriptions since it is a void function.
diff mbox series

Patch

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 1c62cda4ebcd9e3dc5f91d10fa68f975226693dd..33abb6227468c03fd191201aa2bbe05a41fdd9f4 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1812,14 +1812,13 @@  static void of_alias_add(struct alias_prop *ap, struct device_node *np,
 		 ap->alias, ap->stem, ap->id, np);
 }
 
-/**
+/*
  * of_alias_scan - Scan all properties of the 'aliases' node
  * @dt_alloc:	An allocator that provides a virtual address to memory
  *		for storing the resulting tree
  *
  * The function scans all the properties of the 'aliases' node and populates
- * the global lookup table with the properties.  It returns the
- * number of alias properties found, or an error code in case of failure.
+ * the global lookup table with the properties.
  */
 void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
 {