Re: [PATCH net-next v4 4/5] net: mdio: realtek-rtl9300: reject duplicate MDIO bus IDs
From: netdev-bot+sashiko@kernel.org
Date: 2026-09-16 13:35:15
Also in:
linux-devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Critical: 0 · High: 0 · Medium: 0 · Low: 1 - [Low] Claimed DT-binding-vs-driver mismatch: the series patch "dt- bindings: net: realtek,rtl9301-mdio: add clock-frequency" documents a… -- net: mdio: realtek-rtl9300: reject duplicate MDIO bus IDs The patch makes otto_emdio_probe_one() reject a second mdio-bus child node that reuses an already registered reg value, instead of relying on the later failure inside MDIO bus registration. The previously unused priv->bus[] array is now filled in after a successful registration and used as the duplicate check.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/mdio/mdio-realtek-rtl9300.c b/drivers/net/mdio/mdio-realtek-rtl9300.c index 8ca917d9aea3c..45cbefc52100a 100644 --- a/drivers/net/mdio/mdio-realtek-rtl9300.c +++ b/drivers/net/mdio/mdio-realtek-rtl9300.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -868,6 +871,8 @@ static int otto_emdio_probe_one(struct device *dev, struct otto_emdio_priv *priv if (err) return dev_err_probe(dev, err, "cannot register MDIO bus\n"); + priv->bus[mdio_bus] = bus; + return 0; }
[Severity: Low] This is only an ordering observation about the series, not a bug in this patch. At this point in the series, the earlier binding patch "dt-bindings: net: realtek,rtl9301-mdio: add clock-frequency" already documents a per-bus clock-frequency property (2.5/10 MHz for RTL838x, 1.25/2.5/5 MHz for RTL839x/930x/931x, plus the RTL839x shared-selector rule), while otto_emdio_probe_one() still reads only the reg property, so a device tree setting clock-frequency would be silently ignored on these commits. The gap closes at the end of the series in "net: mdio: realtek-rtl9300: support non-default clock frequencies", which adds the consumer in otto_emdio_probe_one(): if (of_property_read_u32(node, "clock-frequency", &freq)) freq = 2500000; err = priv->info->set_bus_frequency(bus, freq); and otto_emdio_8390_set_bus_frequency() relies on exactly the priv->bus[] bookkeeping added here to program the shared RTL839x selector only once: if (priv->bus[0] || priv->bus[1]) return 0; Would it be worth mentioning that dependency, or moving the binding patch next to the driver patch that consumes the property, so that no intermediate commit documents a property the driver ignores? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260912130451.3757276-1-markus.stockhausen%40gmx.de