Skip to content

Commit ce30fa5

Browse files
lunnkuba-moo
authored andcommitted
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>
1 parent b063b19 commit ce30fa5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/net/phy/mdio_bus.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,11 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum,
839839
}
840840
EXPORT_SYMBOL_GPL(__mdiobus_modify_changed);
841841

842+
static u32 mdiobus_c45_addr(int devad, u16 regnum)
843+
{
844+
return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
845+
}
846+
842847
/**
843848
* __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function
844849
* @bus: the mii_bus struct

include/linux/mdio.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,6 @@ static inline int mdiodev_modify_changed(struct mdio_device *mdiodev,
459459
mask, set);
460460
}
461461

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-
467462
static inline u16 mdiobus_c45_regad(u32 regnum)
468463
{
469464
return FIELD_GET(MII_REGADDR_C45_MASK, regnum);

0 commit comments

Comments
 (0)