[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTmZynWdLAG__mH2@makrotopia.org>
Date: Wed, 10 Dec 2025 16:03:30 +0000
From: Daniel Golle <daniel@...rotopia.org>
To: Vladimir Oltean <olteanv@...il.com>
Cc: Hauke Mehrtens <hauke@...ke-m.de>, Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Rasmus Villemoes <ravi@...vas.dk>,
"Benny (Ying-Tsan) Weng" <yweng@...linear.com>,
John Crispin <john@...ozen.org>
Subject: Re: [PATCH net v4 4/4] net: dsa: mxl-gsw1xx: manually clear RANEG bit
On Wed, Dec 10, 2025 at 05:52:49PM +0200, Vladimir Oltean wrote:
> On Tue, Dec 09, 2025 at 01:29:34AM +0000, Daniel Golle wrote:
> > [...]
> > @@ -665,6 +694,9 @@ static void gsw1xx_shutdown(struct mdio_device *mdiodev)
> > dsa_switch_shutdown(priv->ds);
> >
> > dev_set_drvdata(&mdiodev->dev, NULL);
> > +
> > + gsw1xx_priv = container_of(priv, struct gsw1xx_priv, gswip);
> > + cancel_delayed_work_sync(&gsw1xx_priv->clear_raneg);
>
> Nitpick: why did you place this after dev_set_drvdata(dev, NULL) and not before?
> The work item doesn't call dev_get_drvdata(), true, but it's one more refactoring
> step that needs to be taken care of if it should.
As the order of those two doesn't matter I thought the best would be
to do cancel_delayed_work_sync() as the last thing because it is
obviously correct. Eventhough even doing that at all doesn't matter
much in the shutdown() path anyway...
Powered by blists - more mailing lists