[PATCH net 2/2] net: stmmac: skip only stmmac_ptp_register when resume from suspend

Ismail, Mohammad Athari mohammad.athari.ismail at intel.com
Mon Jan 24 14:19:22 PST 2022



> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Monday, January 24, 2022 9:15 PM
> To: Ismail, Mohammad Athari <mohammad.athari.ismail at intel.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro at st.com>; Alexandre Torgue
> <alexandre.torgue at st.com>; Jose Abreu <joabreu at synopsys.com>; David
> S . Miller <davem at davemloft.net>; Jakub Kicinski <kuba at kernel.org>;
> Maxime Coquelin <mcoquelin.stm32 at gmail.com>; Ong, Boon Leong
> <boon.leong.ong at intel.com>; Voon, Weifeng <weifeng.voon at intel.com>;
> Wong, Vee Khee <vee.khee.wong at intel.com>; Huacai Chen
> <chenhuacai at kernel.org>; netdev at vger.kernel.org; linux-stm32 at st-md-
> mailman.stormreply.com; linux-arm-kernel at lists.infradead.org; linux-
> kernel at vger.kernel.org
> Subject: Re: [PATCH net 2/2] net: stmmac: skip only stmmac_ptp_register
> when resume from suspend
> 
> > @@ -3308,13 +3309,11 @@ static int stmmac_hw_setup(struct net_device
> *dev, bool init_ptp)
> >
> >  	stmmac_mmc_setup(priv);
> >
> > -	if (init_ptp) {
> > -		ret = stmmac_init_ptp(priv);
> > -		if (ret == -EOPNOTSUPP)
> > -			netdev_warn(priv->dev, "PTP not supported by
> HW\n");
> > -		else if (ret)
> > -			netdev_warn(priv->dev, "PTP init failed\n");
> > -	}
> > +	ret = stmmac_init_ptp(priv, ptp_register);
> > +	if (ret == -EOPNOTSUPP)
> > +		netdev_warn(priv->dev, "PTP not supported by HW\n");
> > +	else if (ret)
> > +		netdev_warn(priv->dev, "PTP init failed\n");
> 
> The init_ptp parameter now seems unused? If so, please remove it.

I believe you miss below diff. It is renamed to ptp_register.

-static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
+static int stmmac_hw_setup(struct net_device *dev, bool ptp_register)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);


There are build warnings as below. I'll fix it in v2.

../drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:888: warning: Function parameter or member 'ptp_register' not described in 'stmmac_init_ptp'
../drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3256: warning: Excess function parameter 'init_ptp' description in 'stmmac_hw_setup

Thanks

-Athari-

> 
>     Andrew



More information about the linux-arm-kernel mailing list