* [PATCH] clk: Make kerneldoc consistent
@ 2020-08-27 15:28 Thierry Reding
2020-09-08 21:47 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2020-08-27 15:28 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd; +Cc: linux-clk, linux-kernel
From: Thierry Reding <treding@nvidia.com>
The kerneldoc comment for of_parse_clkspec() mentions in one place that
the value of the index parameter dictates how name is used, whereas in
reality it's the name parameter that dictates whether or not the index
parameter is used.
In a later paragraph the kerneldoc comment does mention that the index
will be ignored if the name is non-NULL, so make the parameter
description consistent.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/clk/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 0a9261a099bd..cf6774abebb0 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -4600,7 +4600,7 @@ EXPORT_SYMBOL(devm_of_clk_del_provider);
/**
* of_parse_clkspec() - Parse a DT clock specifier for a given device node
* @np: device node to parse clock specifier from
- * @index: index of phandle to parse clock out of. If index < 0, @name is used
+ * @index: index of phandle to parse clock out of; ignored if @name is non-NULL
* @name: clock name to find and parse. If name is NULL, the index is used
* @out_args: Result of parsing the clock specifier
*
--
2.28.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: Make kerneldoc consistent
2020-08-27 15:28 [PATCH] clk: Make kerneldoc consistent Thierry Reding
@ 2020-09-08 21:47 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2020-09-08 21:47 UTC (permalink / raw)
To: Michael Turquette, Thierry Reding; +Cc: linux-clk, linux-kernel
Quoting Thierry Reding (2020-08-27 08:28:27)
> From: Thierry Reding <treding@nvidia.com>
>
> The kerneldoc comment for of_parse_clkspec() mentions in one place that
> the value of the index parameter dictates how name is used, whereas in
> reality it's the name parameter that dictates whether or not the index
> parameter is used.
It's both name being non-null and index being >= 0. With this change we
lose that information.
>
> In a later paragraph the kerneldoc comment does mention that the index
> will be ignored if the name is non-NULL, so make the parameter
> description consistent.
Agreed. We indicate that if name is non-NULL then this parameter is
ignored.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> drivers/clk/clk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 0a9261a099bd..cf6774abebb0 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -4600,7 +4600,7 @@ EXPORT_SYMBOL(devm_of_clk_del_provider);
> /**
> * of_parse_clkspec() - Parse a DT clock specifier for a given device node
> * @np: device node to parse clock specifier from
> - * @index: index of phandle to parse clock out of. If index < 0, @name is used
> + * @index: index of phandle to parse clock out of; ignored if @name is non-NULL
Maybe, ignored if @name is non-NULL. @name should be used if @index is < 0.
> * @name: clock name to find and parse. If name is NULL, the index is used
This could say "If name is NULL, @index should be used"
> * @out_args: Result of parsing the clock specifier
> *
> --
> 2.28.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-08 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 15:28 [PATCH] clk: Make kerneldoc consistent Thierry Reding
2020-09-08 21:47 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®