Re: [PATCH] clk: Fix doc of clk_get_parent

2021-03-07 Thread Paul Cercueil




Le dim. 7 mars 2021 à 14:30, Russell King - ARM Linux admin 
 a écrit :

On Sun, Mar 07, 2021 at 02:29:07PM +, Paul Cercueil wrote:

 Hi,

 Le dim. 7 mars 2021 à 14:27, Russell King - ARM Linux admin
  a écrit :
 > On Sun, Mar 07, 2021 at 02:06:26PM +, 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




Re: [PATCH] clk: Fix doc of clk_get_parent

2021-03-07 Thread Russell King - ARM Linux admin
On Sun, Mar 07, 2021 at 02:29:07PM +, Paul Cercueil wrote:
> Hi,
> 
> Le dim. 7 mars 2021 à 14:27, Russell King - ARM Linux admin
>  a écrit :
> > On Sun, Mar 07, 2021 at 02:06:26PM +, 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!


Re: [PATCH] clk: Fix doc of clk_get_parent

2021-03-07 Thread Paul Cercueil

Hi,

Le dim. 7 mars 2021 à 14:27, Russell King - ARM Linux admin 
 a écrit :

On Sun, Mar 07, 2021 at 02:06:26PM +, 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




Re: [PATCH] clk: Fix doc of clk_get_parent

2021-03-07 Thread Russell King - ARM Linux admin
On Sun, Mar 07, 2021 at 02:06:26PM +, 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!


[PATCH] clk: Fix doc of clk_get_parent

2021-03-07 Thread 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 
---
 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