lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 1 Dec 2022 09:26:07 +0100
From:   Horatiu Vultur - M31836 <Horatiu.Vultur@...rochip.com>
To:     Divya Koppera - I30481 <Divya.Koppera@...rochip.com>
CC:     "andrew@...n.ch" <andrew@...n.ch>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        UNGLinuxDriver <UNGLinuxDriver@...rochip.com>,
        Madhuri Sripada - I34878 <Madhuri.Sripada@...rochip.com>
Subject: Re: [PATCH v3 net-next] net: phy: micrel: Fix warn: passing zero to
 PTR_ERR

The 12/01/2022 07:08, Divya Koppera - I30481 wrote:
> Hi Horatiu,
> 
> > -----Original Message-----
> > From: Horatiu Vultur <horatiu.vultur@...rochip.com>
> > Sent: Wednesday, November 30, 2022 8:21 PM
> > To: Divya Koppera - I30481 <Divya.Koppera@...rochip.com>
> > Cc: andrew@...n.ch; 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>; Madhuri Sripada - I34878
> > <Madhuri.Sripada@...rochip.com>
> > Subject: Re: [PATCH v3 net-next] net: phy: micrel: Fix warn: passing zero to
> > PTR_ERR
> > 
> > The 11/29/2022 15:46, Divya Koppera wrote:
> > 
> > Hi Divya,
> > 
> > > Handle the NULL pointer case
> > >
> > > Fixes New smatch warnings:
> > > drivers/net/phy/micrel.c:2613 lan8814_ptp_probe_once() warn: passing
> > zero to 'PTR_ERR'
> > >
> > > Fixes Old smatch warnings:
> > > drivers/net/phy/micrel.c:1750 ksz886x_cable_test_get_status() error:
> > > uninitialized symbol 'ret'.
> > 
> > Shouldn't you split this patch in 2 different patches, as you fix 2 issues.
> 
> I got these warnings in single mail, so thought of fixing it in one patch. Also, one patch has single line change so did this way.
> Yeah, splitting sense good, will do in next revision.
> 
> > Also any reason why you target net-next and not net? Because I can see the
> > blamed patches on net branch.
> > 
> 
> Initially I targeted for net-next and in second revision I moved to net as it is fix. But I got a comment as below. So again, targeted to net-next.
> 
> "
> > v1 -> v2:
> > - Handled NULL pointer case
> > - Changed subject line with net-next to net
> 
> This is not a genuine bug fix, and so it should target next-next."

That is fine by me.

...

> > >
> > >
> > >  static void lan8814_ptp_init(struct phy_device *phydev)  {
> > > +	struct lan8814_shared_priv *shared_priv = phydev->shared->priv;
> > >  	struct kszphy_priv *priv = phydev->priv;
> > >  	struct kszphy_ptp_priv *ptp_priv = &priv->ptp_priv;
> > >  	u32 temp;
> > >
> > > -	if (!IS_ENABLED(CONFIG_PTP_1588_CLOCK) ||
> > > -	    !IS_ENABLED(CONFIG_NETWORK_PHY_TIMESTAMPING))
> > > +	/* Check if PHC support is missing at the configuration level */
> > > +	if (!shared_priv->ptp_clock)
> > >  		return;

Sorry I forgot to mention this in the previous email.
Can you rename shared_priv to just shared. Because in all the other places
it is used shared and not shared_priv.

-- 
/Horatiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ