* [PATCH] clk: Fix doc of clk_get_parent
@ 2021-03-07 14:06 Paul Cercueil
2021-03-07 14:27 ` Russell King - ARM Linux admin
0 siblings, 1 reply; 5+ messages in thread
From: Paul Cercueil @ 2021-03-07 14:06 UTC (permalink / raw)
To: Russell King; +Cc: od, linux-clk, linux-kernel, Paul Cercueil
On error, or when the passed parameter is NULL, the return value is NULL
and not a PTR_ERR()-encoded value.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
include/linux/clk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 266e8de3cb51..96031b5f6933 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -745,7 +745,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent);
* @clk: clock source
*
* Returns struct clk corresponding to parent clock source, or
- * valid IS_ERR() condition containing errno.
+ * NULL on error.
*/
struct clk *clk_get_parent(struct clk *clk);
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: Fix doc of clk_get_parent
2021-03-07 14:06 [PATCH] clk: Fix doc of clk_get_parent Paul Cercueil
@ 2021-03-07 14:27 ` Russell King - ARM Linux admin
2021-03-07 14:29 ` Paul Cercueil
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux admin @ 2021-03-07 14:27 UTC (permalink / raw)
To: Paul Cercueil; +Cc: od, linux-clk, linux-kernel
On Sun, Mar 07, 2021 at 02:06:26PM +0000, Paul Cercueil wrote:
> On error, or when the passed parameter is NULL, the return value is NULL
> and not a PTR_ERR()-encoded value.
No, the documentation is accurate. The CCF is just an implementation
of the API, the file you are modifying is the definitive API
documentation.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: Fix doc of clk_get_parent
2021-03-07 14:27 ` Russell King - ARM Linux admin
@ 2021-03-07 14:29 ` Paul Cercueil
2021-03-07 14:30 ` Russell King - ARM Linux admin
0 siblings, 1 reply; 5+ messages in thread
From: Paul Cercueil @ 2021-03-07 14:29 UTC (permalink / raw)
To: Russell King - ARM Linux admin; +Cc: od, linux-clk, linux-kernel
Hi,
Le dim. 7 mars 2021 à 14:27, Russell King - ARM Linux admin
<linux@armlinux.org.uk> a écrit :
> On Sun, Mar 07, 2021 at 02:06:26PM +0000, Paul Cercueil wrote:
>> On error, or when the passed parameter is NULL, the return value is
>> NULL
>> and not a PTR_ERR()-encoded value.
>
> No, the documentation is accurate. The CCF is just an implementation
> of the API, the file you are modifying is the definitive API
> documentation.
Well, then the code has to be fixed, because right now it returns NULL
on error, since the 2.6 days.
Cheers,
-Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: Fix doc of clk_get_parent
2021-03-07 14:29 ` Paul Cercueil
@ 2021-03-07 14:30 ` Russell King - ARM Linux admin
2021-03-07 15:58 ` Paul Cercueil
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux admin @ 2021-03-07 14:30 UTC (permalink / raw)
To: Paul Cercueil; +Cc: od, linux-clk, linux-kernel
On Sun, Mar 07, 2021 at 02:29:07PM +0000, Paul Cercueil wrote:
> Hi,
>
> Le dim. 7 mars 2021 à 14:27, Russell King - ARM Linux admin
> <linux@armlinux.org.uk> a écrit :
> > On Sun, Mar 07, 2021 at 02:06:26PM +0000, Paul Cercueil wrote:
> > > On error, or when the passed parameter is NULL, the return value is
> > > NULL
> > > and not a PTR_ERR()-encoded value.
> >
> > No, the documentation is accurate. The CCF is just an implementation
> > of the API, the file you are modifying is the definitive API
> > documentation.
>
> Well, then the code has to be fixed, because right now it returns NULL on
> error, since the 2.6 days.
And you consider NULL to be an error? A NULL clock isn't defined to be
an error by the API.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: Fix doc of clk_get_parent
2021-03-07 14:30 ` Russell King - ARM Linux admin
@ 2021-03-07 15:58 ` Paul Cercueil
0 siblings, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2021-03-07 15:58 UTC (permalink / raw)
To: Russell King - ARM Linux admin; +Cc: od, linux-clk, linux-kernel
Le dim. 7 mars 2021 à 14:30, Russell King - ARM Linux admin
<linux@armlinux.org.uk> a écrit :
> On Sun, Mar 07, 2021 at 02:29:07PM +0000, Paul Cercueil wrote:
>> Hi,
>>
>> Le dim. 7 mars 2021 à 14:27, Russell King - ARM Linux admin
>> <linux@armlinux.org.uk> a écrit :
>> > On Sun, Mar 07, 2021 at 02:06:26PM +0000, Paul Cercueil wrote:
>> > > On error, or when the passed parameter is NULL, the return
>> value is
>> > > NULL
>> > > and not a PTR_ERR()-encoded value.
>> >
>> > No, the documentation is accurate. The CCF is just an
>> implementation
>> > of the API, the file you are modifying is the definitive API
>> > documentation.
>>
>> Well, then the code has to be fixed, because right now it returns
>> NULL on
>> error, since the 2.6 days.
>
> And you consider NULL to be an error? A NULL clock isn't defined to be
> an error by the API.
Fair enough. Ignore my patch then.
Cheers,
-Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-07 15:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07 14:06 [PATCH] clk: Fix doc of clk_get_parent Paul Cercueil
2021-03-07 14:27 ` Russell King - ARM Linux admin
2021-03-07 14:29 ` Paul Cercueil
2021-03-07 14:30 ` Russell King - ARM Linux admin
2021-03-07 15:58 ` Paul Cercueil
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.