Re: [PATCH net-next 1/5] net: mdio: realtek-rtl9300: provide generic command runner

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-05-26 19:27:51
Reply to
Markus Stockhausen, 2026-05-26
quoted hunk ↗ jump to hunk
+static struct otto_emdio_priv *otto_emdio_bus_to_priv(struct mii_bus *bus)
+{
+	return ((struct otto_emdio_chan *)bus->priv)->priv;
Assuming priv is a void *, you should not need the cast.  You might
however need an intermediary variable.
+	scoped_guard(mutex, &priv->lock)
+		ret = (*priv->info->write_c45)(bus, port, dev_addr, regnum, value);
The (* ) should not be needed.

	Andrew
Thread (8 messages) 8 messages, 2 authors, last reply 2026-05-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help