Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: mdio: Move mdiobus_c45_addr() next to users

Now that mdiobus_c45_addr() is only used within the MDIO code during
fallback, move the function next to its only users. This function
should not be used any more in drivers, the c45 helpers should be used
in its place, so hiding it away will prevent any new users from being
added.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Andrew Lunn and committed by
Jakub Kicinski
ce30fa56 b063b192

+5 -5
+5
drivers/net/phy/mdio_bus.c
··· 839 839 } 840 840 EXPORT_SYMBOL_GPL(__mdiobus_modify_changed); 841 841 842 + static u32 mdiobus_c45_addr(int devad, u16 regnum) 843 + { 844 + return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; 845 + } 846 + 842 847 /** 843 848 * __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function 844 849 * @bus: the mii_bus struct
-5
include/linux/mdio.h
··· 459 459 mask, set); 460 460 } 461 461 462 - static inline u32 mdiobus_c45_addr(int devad, u16 regnum) 463 - { 464 - return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; 465 - } 466 - 467 462 static inline u16 mdiobus_c45_regad(u32 regnum) 468 463 { 469 464 return FIELD_GET(MII_REGADDR_C45_MASK, regnum);