* [PATCH] clk: Fix *bulk_get* return value documentation
@ 2021-08-11 7:57 Markus Schneider-Pargmann
2021-08-12 19:25 ` Stephen Boyd
0 siblings, 1 reply; 3+ messages in thread
From: Markus Schneider-Pargmann @ 2021-08-11 7:57 UTC (permalink / raw)
To: Russell King; +Cc: linux-clk, Markus Schneider-Pargmann
Some of the bulk_get variants document that the return value is a valid
IS_ERR() condition but it is not. These functions return an errno
directly if an error occures.
This patch fixes that documentation and documents that the return value
is 0 or errno.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
include/linux/clk.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 266e8de3cb51..56a741903963 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -340,7 +340,7 @@ struct clk *clk_get(struct device *dev, const char *id);
* that were obtained will be freed before returning to the caller.
*
* Returns 0 if all clocks specified in clk_bulk_data table are obtained
- * successfully, or valid IS_ERR() condition containing errno.
+ * successfully, or an errno otherwise.
* The implementation uses @dev and @clk_bulk_data.id to determine the
* clock consumer, and thereby the clock producer.
* The clock returned is stored in each @clk_bulk_data.clk field.
@@ -409,8 +409,8 @@ int __must_check devm_clk_bulk_get(struct device *dev, int num_clks,
* NULL for given clk. It is assumed all clocks in clk_bulk_data are optional.
*
* Returns 0 if all clocks specified in clk_bulk_data table are obtained
- * successfully or for any clk there was no clk provider available, otherwise
- * returns valid IS_ERR() condition containing errno.
+ * successfully or for any clk there was no clk provider available, or an errno
+ * otherwise.
* The implementation uses @dev and @clk_bulk_data.id to determine the
* clock consumer, and thereby the clock producer.
* The clock returned is stored in each @clk_bulk_data.clk field.
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: Fix *bulk_get* return value documentation
2021-08-11 7:57 [PATCH] clk: Fix *bulk_get* return value documentation Markus Schneider-Pargmann
@ 2021-08-12 19:25 ` Stephen Boyd
2021-08-17 7:26 ` Markus Schneider-Pargmann
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2021-08-12 19:25 UTC (permalink / raw)
To: Markus Schneider-Pargmann, Russell King
Cc: linux-clk, Markus Schneider-Pargmann
Quoting Markus Schneider-Pargmann (2021-08-11 00:57:19)
> Some of the bulk_get variants document that the return value is a valid
> IS_ERR() condition but it is not. These functions return an errno
> directly if an error occures.
>
> This patch fixes that documentation and documents that the return value
> is 0 or errno.
>
> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> ---
> include/linux/clk.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/clk.h b/include/linux/clk.h
> index 266e8de3cb51..56a741903963 100644
> --- a/include/linux/clk.h
> +++ b/include/linux/clk.h
> @@ -340,7 +340,7 @@ struct clk *clk_get(struct device *dev, const char *id);
> * that were obtained will be freed before returning to the caller.
> *
> * Returns 0 if all clocks specified in clk_bulk_data table are obtained
> - * successfully, or valid IS_ERR() condition containing errno.
> + * successfully, or an errno otherwise.
> * The implementation uses @dev and @clk_bulk_data.id to determine the
> * clock consumer, and thereby the clock producer.
> * The clock returned is stored in each @clk_bulk_data.clk field.
While you're here can you also use the Return: syntax so it isn't
freeform and doc generation can split it out?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: Fix *bulk_get* return value documentation
2021-08-12 19:25 ` Stephen Boyd
@ 2021-08-17 7:26 ` Markus Schneider-Pargmann
0 siblings, 0 replies; 3+ messages in thread
From: Markus Schneider-Pargmann @ 2021-08-17 7:26 UTC (permalink / raw)
To: Stephen Boyd; +Cc: Russell King, linux-clk
Hi Stephen,
On Thu, Aug 12, 2021 at 12:25:38PM -0700, Stephen Boyd wrote:
> Quoting Markus Schneider-Pargmann (2021-08-11 00:57:19)
> > Some of the bulk_get variants document that the return value is a valid
> > IS_ERR() condition but it is not. These functions return an errno
> > directly if an error occures.
> >
> > This patch fixes that documentation and documents that the return value
> > is 0 or errno.
> >
> > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> > ---
> > include/linux/clk.h | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/clk.h b/include/linux/clk.h
> > index 266e8de3cb51..56a741903963 100644
> > --- a/include/linux/clk.h
> > +++ b/include/linux/clk.h
> > @@ -340,7 +340,7 @@ struct clk *clk_get(struct device *dev, const char *id);
> > * that were obtained will be freed before returning to the caller.
> > *
> > * Returns 0 if all clocks specified in clk_bulk_data table are obtained
> > - * successfully, or valid IS_ERR() condition containing errno.
> > + * successfully, or an errno otherwise.
> > * The implementation uses @dev and @clk_bulk_data.id to determine the
> > * clock consumer, and thereby the clock producer.
> > * The clock returned is stored in each @clk_bulk_data.clk field.
>
> While you're here can you also use the Return: syntax so it isn't
> freeform and doc generation can split it out?
thanks, good idea. Will do that.
Best,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-17 7:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 7:57 [PATCH] clk: Fix *bulk_get* return value documentation Markus Schneider-Pargmann
2021-08-12 19:25 ` Stephen Boyd
2021-08-17 7:26 ` Markus Schneider-Pargmann
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.