[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR11MB47713C125F3D0E08B7A6A132E21B9@CO1PR11MB4771.namprd11.prod.outlook.com>
Date: Tue, 6 Dec 2022 13:45:12 +0000
From: <Divya.Koppera@...rochip.com>
To: <andrew@...n.ch>
CC: <hkallweit1@...il.com>, <linux@...linux.org.uk>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <richardcochran@...il.com>,
<UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH v5 net-next 2/2] net: phy: micrel: Fix warn: passing zero
to PTR_ERR
Hi Andrew,
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Tuesday, December 6, 2022 6:38 PM
> To: Divya Koppera - I30481 <Divya.Koppera@...rochip.com>
> Cc: hkallweit1@...il.com; linux@...linux.org.uk; davem@...emloft.net;
> edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> richardcochran@...il.com; UNGLinuxDriver
> <UNGLinuxDriver@...rochip.com>
> Subject: Re: [PATCH v5 net-next 2/2] net: phy: micrel: Fix warn: passing zero
> to PTR_ERR
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index
> > 1bcdb828db56..650ef53fcf20 100644
> > --- a/drivers/net/phy/micrel.c
> > +++ b/drivers/net/phy/micrel.c
> > @@ -3017,10 +3017,6 @@ static int lan8814_ptp_probe_once(struct
> > phy_device *phydev) {
> > struct lan8814_shared_priv *shared = phydev->shared->priv;
> >
> > - if (!IS_ENABLED(CONFIG_PTP_1588_CLOCK) ||
> > - !IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING))
> > - return 0;
> > -
>
> Why are you removing this ?
>
I got review comment from Richard in v2 as below, making it as consistent by checking ptp_clock. So removed it in next revision.
" > static int lan8814_ptp_probe_once(struct phy_device *phydev)
> {
> struct lan8814_shared_priv *shared = phydev->shared->priv;
>
> if (!IS_ENABLED(CONFIG_PTP_1588_CLOCK) ||
> !IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING))
> return 0;
It is weird to use macros here, but not before calling ptp_clock_register.
Make it consistent by checking shared->ptp_clock instead.
That is also better form."
> Andrew
Powered by blists - more mailing lists