Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Arnd Bergmann
On Wednesday 27 April 2016 14:47:29 Florian Fainelli wrote: > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c > index 499003ee8055..94a27b028dd8 100644 > --- a/drivers/net/phy/mdio_bus.c > +++ b/drivers/net/phy/mdio_bus.c > @@ -333,7 +333,7 @@ int __mdiobus_register(struct mii_

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Arnd Bergmann
On Wednesday 27 April 2016 23:09:37 Sergei Shtylyov wrote: > Hello. > > On 04/27/2016 10:49 PM, Andrew Lunn wrote: > > >> Sergei Shtylyov writes: > >> > >>> Arnd Bergmann asked that get_phy_device() returns either NULL or the error > >>> value, not both on error. Do as he said, return ERR_PTR(

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Florian Fainelli
On 27/04/16 12:49, Andrew Lunn wrote: > On Wed, Apr 27, 2016 at 03:30:57PM -0400, Vivien Didelot wrote: >> Hi David, All, >> >> Sergei Shtylyov writes: >> >>> Arnd Bergmann asked that get_phy_device() returns either NULL or the error >>> value, not both on error. Do as he said, return ERR_PTR(-E

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread David Miller
From: Sergei Shtylyov Date: Wed, 27 Apr 2016 23:09:37 +0300 > On 04/27/2016 10:49 PM, Andrew Lunn wrote: > >> Please revert this, or fix all the callsites such that ENODEV is not a >> fatal error. > >OK, I'll do what DaveM decides. If you feel confident getting all the ENODEV checks right,

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Florian Fainelli
On 27/04/16 13:12, Sergei Shtylyov wrote: > Hello. > > On 04/27/2016 10:30 PM, Vivien Didelot wrote: > >>> Arnd Bergmann asked that get_phy_device() returns either NULL or the >>> error >>> value, not both on error. Do as he said, return ERR_PTR(-ENODEV) >>> instead >>> of NULL when the PHY ID

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Sergei Shtylyov
Hello. On 04/27/2016 10:30 PM, Vivien Didelot wrote: Arnd Bergmann asked that get_phy_device() returns either NULL or the error value, not both on error. Do as he said, return ERR_PTR(-ENODEV) instead of NULL when the PHY ID registers read as all ones. Suggested-by: Arnd Bergmann Signed-of

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Sergei Shtylyov
Hello. On 04/27/2016 10:49 PM, Andrew Lunn wrote: Sergei Shtylyov writes: Arnd Bergmann asked that get_phy_device() returns either NULL or the error value, not both on error. Do as he said, return ERR_PTR(-ENODEV) instead of NULL when the PHY ID registers read as all ones. Suggested-by:

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-27 Thread Andrew Lunn
On Wed, Apr 27, 2016 at 03:30:57PM -0400, Vivien Didelot wrote: > Hi David, All, > > Sergei Shtylyov writes: > > > Arnd Bergmann asked that get_phy_device() returns either NULL or the error > > value, not both on error. Do as he said, return ERR_PTR(-ENODEV) instead > > of NULL when the PHY ID

Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()

2016-04-25 Thread Florian Fainelli
On 24/04/16 10:25, Sergei Shtylyov wrote: > Arnd Bergmann asked that get_phy_device() returns either NULL or the error > value, not both on error. Do as he said, return ERR_PTR(-ENODEV) instead > of NULL when the PHY ID registers read as all ones. > > Suggested-by: Arnd Bergmann > Signed-off-b