summaryrefslogtreecommitdiff
path: root/rust/helpers/build_bug.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2025-08-27 09:41:48 +0100
committerJakub Kicinski <kuba@kernel.org>2025-08-28 16:44:03 -0700
commitbafdd920a060eb1bad51c1c70b9850403548252f (patch)
tree223c184dbb114811ad327c777fb1f51fa45723f7 /rust/helpers/build_bug.c
parent5e3aae2d3271cf5fd3e37683ff1392dd7bed5389 (diff)
net: stmmac: mdio: use netdev_priv() directly
netdev_priv() is an inline function, taking a struct net_device pointer. When passing in the MII bus->priv, which is a void pointer, there is no need to go via a local ndev variable to type it first. Thus, instead of: struct net_device *ndev = bus->priv; struct stmmac_priv *priv; ... priv = netdev_priv(ndev); we can simply do: struct stmmac_priv *priv = netdev_priv(bus->priv); which simplifies the code. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com> Link: https://patch.msgid.link/E1urBj2-000000002as-0pod@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions