Re: [PATCH net-next v3 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC

From: Andrew Lunn

Date: Tue Dec 01 2026 - 12:24:10 EST


> +/* Protect the list of MDIO providers, keyed by their shared syscon regmap. */
> +static DEFINE_MUTEX(syna_mdio_lock);
> +static LIST_HEAD(syna_mdio_owners);

A linked list seems a bit over the top. syna_dwmac_claim_mdio() could
use test_and_set_bit(), which is atomic, no need for a mutex, and if
the bit is already set, return EINVAL. The release method can probably
use clear_bit().

Andrew

---
pw-bot: cr
Andrew