[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a95e3b77-bdda-428e-9d25-f9be017fd40a@lunn.ch>
Date: Tue, 11 Jun 2024 14:57:17 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vineeth Karumanchi <vineeth.karumanchi@....com>
Cc: nicolas.ferre@...rochip.com, claudiu.beznea@...on.dev,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
linux@...linux.org.uk, vadim.fedorenko@...ux.dev,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, git@....com
Subject: Re: [PATCH net-next v4 3/4] net: macb: Add ARP support to WOL
> > > + /* Don't manage WoL on MAC if there's a failure in talking to the PHY */
> > > + if (!!ret && ret != -EOPNOTSUPP)
> > > return ret;
> >
> > The comment is wrong. You could be happily talking to the PHY, it just
> > does not support what you asked it to do.
> >
>
>
> These are the 3 possible return scenarios
>
> 1. -EOPNOTSUPP. : When there is no PHY or no set_wol() in PHY driver.
> 2. 0 : Success
> 3. any error (-EINVAL, ... ) from set_wol()
>
> we are returning in case 3.
>
> The comment can be "Don't manage WoL on MAC, if PHY set_wol() fails"
O.K.
You don't need the !! on ret.
Andrew
Powered by blists - more mailing lists