[PATCH v3] net: stmmac: move the lock to struct plat_stmmacenet_data

Russell King (Oracle) linux at armlinux.org.uk
Wed May 8 01:11:37 PDT 2024


On Wed, May 08, 2024 at 12:52:57PM +0800, Xiaolei Wang wrote:
> Reinitialize the whole est structure would also reset the mutex lock
> which is embedded in the est structure, and then trigger the following
> warning. To address this, move the lock to struct plat_stmmacenet_data.
> We also need to require the mutex lock when doing this initialization.

What is plat->lock protecting exactly? "lock" is opaque and doesn't
hint at its purpose. Does it serialise accesses to plat->est? If so,
consider naming it plat->est_lock to make its purpose and what it's
doing clear.

Please also follow netdev best practice; allow at least 24 hours to
pass _and_ for discussion to finish before posting a new version of
a patch or patch series.

Also see the "How do I indicate which tree" question at:
https://www.kernel.org/doc/html/v5.3/networking/netdev-FAQ.html

Thanks.

-- 
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