linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: fix error handling
@ 2016-07-03  5:55 Christophe JAILLET
  2016-07-03 20:04 ` Maxime Ripard
  2016-07-03 21:08 ` Christophe JAILLET
  0 siblings, 2 replies; 6+ messages in thread
From: Christophe JAILLET @ 2016-07-03  5:55 UTC (permalink / raw)
  To: kishon, maxime.ripard, wens
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors, Christophe JAILLET

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] phy: fix error handling
  2016-07-03  5:55 [PATCH] phy: fix error handling Christophe JAILLET
@ 2016-07-03 20:04 ` Maxime Ripard
  2016-07-03 21:08 ` Christophe JAILLET
  1 sibling, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2016-07-03 20:04 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: kishon, wens, linux-arm-kernel, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] phy: fix error handling
  2016-07-03  5:55 [PATCH] phy: fix error handling Christophe JAILLET
  2016-07-03 20:04 ` Maxime Ripard
@ 2016-07-03 21:08 ` Christophe JAILLET
  2016-07-04  7:52   ` Kishon Vijay Abraham I
  1 sibling, 1 reply; 6+ messages in thread
From: Christophe JAILLET @ 2016-07-03 21:08 UTC (permalink / raw)
  To: kishon, maxime.ripard, wens
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors

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);
>   		}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] phy: fix error handling
  2016-07-03 21:08 ` Christophe JAILLET
@ 2016-07-04  7:52   ` Kishon Vijay Abraham I
  2016-07-04  8:51     ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Kishon Vijay Abraham I @ 2016-07-04  7:52 UTC (permalink / raw)
  To: Christophe JAILLET, maxime.ripard, wens
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors

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);
>>           }
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] phy: fix error handling
  2016-07-04  7:52   ` Kishon Vijay Abraham I
@ 2016-07-04  8:51     ` Dan Carpenter
  2016-07-04  8:58       ` Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2016-07-04  8:51 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Chen-Yu Tsai
  Cc: Christophe JAILLET, maxime.ripard, wens, linux-arm-kernel,
	linux-kernel, kernel-janitors

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] phy: fix error handling
  2016-07-04  8:51     ` Dan Carpenter
@ 2016-07-04  8:58       ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2016-07-04  8:58 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Kishon Vijay Abraham I, Chen-Yu Tsai, Christophe JAILLET,
	maxime.ripard, linux-arm-kernel, linux-kernel, kernel-janitors



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-04  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03  5:55 [PATCH] phy: fix error handling Christophe JAILLET
2016-07-03 20:04 ` Maxime Ripard
2016-07-03 21:08 ` Christophe JAILLET
2016-07-04  7:52   ` Kishon Vijay Abraham I
2016-07-04  8:51     ` Dan Carpenter
2016-07-04  8:58       ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).