From: Dan Carpenter
Date: Wed, 25 Sep 2019 13:59:11 +0300
> The "lp->phy_mode" is an enum but in this context GCC treats it as an
> unsigned int so the error handling is never triggered.
>
> Fixes: ee06b1728b95 ("net: axienet: add support for standard phy-mode
> binding")
> Signed-off-by: Dan C
> The get_phy_mode() function seem like they lend themselves to creating
> these bugs. The ->phy_mode variables tend to be declared in the driver
> so it would require quite a few patches to make them all int and I'm not
> sure that's more beautiful. Andrew Lunn's idea to update the API would
> p
On Wed, Sep 25, 2019 at 01:05:43PM +0200, Alvaro G. M wrote:
> Hi, Dan
>
> On Wed, Sep 25, 2019 at 01:59:11PM +0300, Dan Carpenter wrote:
> > The "lp->phy_mode" is an enum but in this context GCC treats it as an
> > unsigned int so the error handling is never triggered.
> >
> > lp->ph
On Wed, Sep 25, 2019 at 01:35:07PM +0200, David Miller wrote:
> From: "Alvaro G. M"
> Date: Wed, 25 Sep 2019 13:05:43 +0200
>
> > Hi, Dan
> >
> > On Wed, Sep 25, 2019 at 01:59:11PM +0300, Dan Carpenter wrote:
> >> The "lp->phy_mode" is an enum but in this context GCC treats it as an
> >> unsigne
> -Original Message-
> From: Dan Carpenter
> Sent: Wednesday, September 25, 2019 4:29 PM
> To: Radhey Shyam Pandey ; Alvaro G. M
>
> Cc: David S. Miller ; Michal Simek
> ; Russell King ;
> netdev@vger.kernel.org; kernel-janit...@vger.kernel.org
> Subject: [PATCH net] net: axienet: fix a s
From: "Alvaro G. M"
Date: Wed, 25 Sep 2019 13:05:43 +0200
> Hi, Dan
>
> On Wed, Sep 25, 2019 at 01:59:11PM +0300, Dan Carpenter wrote:
>> The "lp->phy_mode" is an enum but in this context GCC treats it as an
>> unsigned int so the error handling is never triggered.
>>
>> lp->phy_mo
Hi, Dan
On Wed, Sep 25, 2019 at 01:59:11PM +0300, Dan Carpenter wrote:
> The "lp->phy_mode" is an enum but in this context GCC treats it as an
> unsigned int so the error handling is never triggered.
>
> lp->phy_mode = of_get_phy_mode(pdev->dev.of_node);
> - if (lp->phy_