Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435911 > unrolled thread

[PATCH] phy: fix error handling

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2016-07-03 08:00 +0200
Last post2016-07-04 11:00 +0200
Articles 6 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] phy: fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-07-03 08:00 +0200
    Re: [PATCH] phy: fix error handling Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-07-03 22:10 +0200
    Re: [PATCH] phy: fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-07-03 23:10 +0200
      Re: [PATCH] phy: fix error handling Kishon Vijay Abraham I <kishon@ti.com> - 2016-07-04 10:00 +0200
        Re: [PATCH] phy: fix error handling Julia Lawall <julia.lawall@lip6.fr> - 2016-07-04 11:00 +0200
        Re: [PATCH] phy: fix error handling Dan Carpenter <dan.carpenter@oracle.com> - 2016-07-04 11:00 +0200

#1435911 — [PATCH] phy: fix error handling

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-07-03 08:00 +0200
Subject[PATCH] phy: fix error handling
Message-ID<rQIBH-4Vo-3@gated-at.bofh.it>
This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/phy/phy-sun9i-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-sun9i-usb.c b/drivers/phy/phy-sun9i-usb.c
index ac4f31a..ff99eba 100644
--- a/drivers/phy/phy-sun9i-usb.c
+++ b/drivers/phy/phy-sun9i-usb.c
@@ -141,7 +141,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev)
 		}
 
 		phy->hsic_clk = devm_clk_get(dev, "hsic_12M");
-		if (IS_ERR(phy->clk)) {
+		if (IS_ERR(phy->hsic_clk)) {
 			dev_err(dev, "failed to get hsic_12M clock\n");
 			return PTR_ERR(phy->clk);
 		}
-- 
2.7.4

[toc] | [next] | [standalone]


#1436035

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-07-03 22:10 +0200
Message-ID<rQVSh-4CC-5@gated-at.bofh.it>
In reply to#1435911

[Multipart message — attachments visible in raw view] — view raw

On Sun, Jul 03, 2016 at 07:55:32AM +0200, Christophe JAILLET wrote:
> This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
> expected here.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1436057

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-07-03 23:10 +0200
Message-ID<rQWOm-5hg-13@gated-at.bofh.it>
In reply to#1435911
I will resubmit in the coming days.

    return PTR_ERR(phy->clk);
should also be updated.

Best regards,
CJ

Le 03/07/2016 à 07:55, Christophe JAILLET a écrit :
> This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
> expected here.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/phy/phy-sun9i-usb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/phy-sun9i-usb.c b/drivers/phy/phy-sun9i-usb.c
> index ac4f31a..ff99eba 100644
> --- a/drivers/phy/phy-sun9i-usb.c
> +++ b/drivers/phy/phy-sun9i-usb.c
> @@ -141,7 +141,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev)
>   		}
>   
>   		phy->hsic_clk = devm_clk_get(dev, "hsic_12M");
> -		if (IS_ERR(phy->clk)) {
> +		if (IS_ERR(phy->hsic_clk)) {
>   			dev_err(dev, "failed to get hsic_12M clock\n");
>   			return PTR_ERR(phy->clk);
>   		}

[toc] | [prev] | [next] | [standalone]


#1436241

FromKishon Vijay Abraham I <kishon@ti.com>
Date2016-07-04 10:00 +0200
Message-ID<rR6Xo-2SK-25@gated-at.bofh.it>
In reply to#1436057
Hi,

On Monday 04 July 2016 02:38 AM, Christophe JAILLET wrote:
> I will resubmit in the coming days.
> 
>    return PTR_ERR(phy->clk);
> should also be updated.

while at that, also fix your $subject to something like
"phy: sun9i-usb: fix error handling"

Thanks
Kishon

> 
> Best regards,
> CJ
> 
> Le 03/07/2016 à 07:55, Christophe JAILLET a écrit :
>> This is likely that checking 'phy->hsic_clk' instead of 'phy->clk' is
>> expected here.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>>   drivers/phy/phy-sun9i-usb.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/phy/phy-sun9i-usb.c b/drivers/phy/phy-sun9i-usb.c
>> index ac4f31a..ff99eba 100644
>> --- a/drivers/phy/phy-sun9i-usb.c
>> +++ b/drivers/phy/phy-sun9i-usb.c
>> @@ -141,7 +141,7 @@ static int sun9i_usb_phy_probe(struct platform_device *pdev)
>>           }
>>             phy->hsic_clk = devm_clk_get(dev, "hsic_12M");
>> -        if (IS_ERR(phy->clk)) {
>> +        if (IS_ERR(phy->hsic_clk)) {
>>               dev_err(dev, "failed to get hsic_12M clock\n");
>>               return PTR_ERR(phy->clk);
>>           }
> 
> 

[toc] | [prev] | [next] | [standalone]


#1436332

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-07-04 11:00 +0200
Message-ID<rR7Tr-3rR-11@gated-at.bofh.it>
In reply to#1436241

On Mon, 4 Jul 2016, Dan Carpenter wrote:

> On Mon, Jul 04, 2016 at 01:22:50PM +0530, Kishon Vijay Abraham I wrote:
> > Hi,
> >
> > On Monday 04 July 2016 02:38 AM, Christophe JAILLET wrote:
> > > I will resubmit in the coming days.
> > >
> > >    return PTR_ERR(phy->clk);
> > > should also be updated.
> >
> > while at that, also fix your $subject to something like
> > "phy: sun9i-usb: fix error handling"
> >
>
> Yes.  Also the first patch should have used that same prefix.
> 9c3b44302636 ('phy: Add driver to support individual USB PHYs on sun9i')
>
> We have this problem quite often, but other subsystems have fixed it
> because they start using the correct prefix when the driver is added.
> The second patch for this driver had the same issue:
> 9c3b44302636 ('phy: Add driver to support individual USB PHYs on sun9i')

Is there any hope to some day have a deterministic algorithm?  Something
that get_maintainers could figure out.

julia

[toc] | [prev] | [next] | [standalone]


#1436333

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-07-04 11:00 +0200
Message-ID<rR7Tr-3rR-13@gated-at.bofh.it>
In reply to#1436241
On Mon, Jul 04, 2016 at 01:22:50PM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On Monday 04 July 2016 02:38 AM, Christophe JAILLET wrote:
> > I will resubmit in the coming days.
> > 
> >    return PTR_ERR(phy->clk);
> > should also be updated.
> 
> while at that, also fix your $subject to something like
> "phy: sun9i-usb: fix error handling"
> 

Yes.  Also the first patch should have used that same prefix.
9c3b44302636 ('phy: Add driver to support individual USB PHYs on sun9i')

We have this problem quite often, but other subsystems have fixed it
because they start using the correct prefix when the driver is added.
The second patch for this driver had the same issue:
9c3b44302636 ('phy: Add driver to support individual USB PHYs on sun9i')

regards,
dan carpenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web