[PATCH RFC net-next 3/5] net: stmmac: simplify phylink_suspend() and phylink_resume() calls
Russell King (Oracle)
linux at armlinux.org.uk
Thu Feb 27 09:25:02 PST 2025
On Thu, Feb 27, 2025 at 05:45:35PM +0100, Andrew Lunn wrote:
> > @@ -7927,13 +7925,9 @@ int stmmac_resume(struct device *dev)
> > }
> >
> > rtnl_lock();
> > - if (device_may_wakeup(priv->device) && priv->plat->pmt) {
> > - phylink_resume(priv->phylink);
> > - } else {
> > - phylink_resume(priv->phylink);
> > - if (device_may_wakeup(priv->device))
> > - phylink_speed_up(priv->phylink);
> > - }
> > + phylink_resume(priv->phylink);
> > + if (device_may_wakeup(priv->device) && !priv->plat->pmt)
> > + phylink_speed_up(priv->phylink);
> > rtnl_unlock();
> >
> > rtnl_lock();
>
> Unrelated to this patch, but unlock() followed by lock()? Seems like
> some more code which could be cleaned up?
Indeed, this vanishes in the next patch due to phylink_resume()
moving later.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list