netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Horatiu Vultur - M31836 <Horatiu.Vultur@microchip.com>
To: Divya Koppera - I30481 <Divya.Koppera@microchip.com>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	UNGLinuxDriver <UNGLinuxDriver@microchip.com>,
	Madhuri Sripada - I34878 <Madhuri.Sripada@microchip.com>
Subject: Re: [PATCH v3 net-next] net: phy: micrel: Fix warn: passing zero to PTR_ERR
Date: Thu, 1 Dec 2022 09:26:07 +0100	[thread overview]
Message-ID: <20221201082607.ap4jqool2uc6ziqk@soft-dev3-1> (raw)
In-Reply-To: <CO1PR11MB4771030026F8460B5A92DC35E2149@CO1PR11MB4771.namprd11.prod.outlook.com>

The 12/01/2022 07:08, Divya Koppera - I30481 wrote:
> Hi Horatiu,
> 
> > -----Original Message-----
> > From: Horatiu Vultur <horatiu.vultur@microchip.com>
> > Sent: Wednesday, November 30, 2022 8:21 PM
> > To: Divya Koppera - I30481 <Divya.Koppera@microchip.com>
> > Cc: andrew@lunn.ch; hkallweit1@gmail.com; linux@armlinux.org.uk;
> > davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> > pabeni@redhat.com; netdev@vger.kernel.org; linux-
> > kernel@vger.kernel.org; richardcochran@gmail.com; UNGLinuxDriver
> > <UNGLinuxDriver@microchip.com>; Madhuri Sripada - I34878
> > <Madhuri.Sripada@microchip.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

      reply	other threads:[~2022-12-01  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 10:16 [PATCH v3 net-next] net: phy: micrel: Fix warn: passing zero to PTR_ERR Divya Koppera
2022-11-30 14:50 ` Horatiu Vultur
2022-12-01  7:08   ` Divya.Koppera
2022-12-01  8:26     ` Horatiu Vultur - M31836 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221201082607.ap4jqool2uc6ziqk@soft-dev3-1 \
    --to=horatiu.vultur@microchip.com \
    --cc=Divya.Koppera@microchip.com \
    --cc=Madhuri.Sripada@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).