net: phy: remove unused fixup unregistering functions
Subsystems (4)
Heiner Kallweit
maintainerPATCH v2 1/1 net: phy: remove unused fixup unregistering functions
No user of PHY fixups unregisters these. IOW: The fixup unregistering functions are unused and can be removed. Remove also documentation for these functions. Whilst at it, remove also mentioning of phy_register_fixup() from the Documentation, as this function has been static since ea47e70e476f ("net: phy: remove fixup-related definitions from phy.h which are not used outside phylib").
Fixup unregistering functions were added with f38e7a32ee4f ("phy: add phy fixup unregister functions") in 2016, and last user was removed with 6782d06a47ad ("net: usb: lan78xx: Remove KSZ9031 PHY fixup") in 2024.
---
v2:
- improve commit message
- remove related documentation
- remove also phy_register_fixup from documentation
--- Documentation/networking/phy.rst | 22 +-------------- drivers/net/phy/phy_device.c | 46 -------------------------------- include/linux/phy.h | 4 --- 3 files changed, 1 insertion(+), 71 deletions(-)
Documentation/networking/phy.rst +1 -21
@@ -524,33 +524,13 @@ When a match is found, the PHY layer will invoke the run function associated with the fixup. This function is passed a pointer to the phy_device of interest. It should therefore only operate on that PHY. -The platform code can either register the fixup using phy_register_fixup():: - - int phy_register_fixup(const char *phy_id, - u32 phy_uid, u32 phy_uid_mask, - int (*run)(struct phy_device *)); - -Or using one of the two stubs, phy_register_fixup_for_uid() and -phy_register_fixup_for_id():: +The platform code can register the fixup using one of:: int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, int (*run)(struct phy_device *)); int phy_register_fixup_for_id(const char *phy_id, int (*run)(struct phy_device *)); -The stubs set one of the two matching criteria, and set the other one to -match anything. - -When phy_register_fixup() or \*_for_uid()/\*_for_id() is called at module load -time, the module needs to unregister the fixup and free allocated memory when -it's unloaded. - -Call one of following function before unloading module:: - - int phy_unregister_fixup(const char *phy_id, u32 phy_uid, u32 phy_uid_mask); - int phy_unregister_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask); - int phy_register_fixup_for_id(const char *phy_id); - Standards =========
drivers/net/phy/phy_device.c +0 -46
52 lines not on this page · raw message
include/linux/phy.h +0 -4
@@ -2356,10 +2356,6 @@ int phy_register_fixup_for_id(const char *bus_id,int phy_register_fixup_for_uid (u32 phy_uid,u32 phy_uid_mask,int (*run)(struct phy_device *)); -int phy_unregister_fixup (const char *bus_id,u32 phy_uid,u32 phy_uid_mask); -int phy_unregister_fixup_for_id (const char *bus_id); -int phy_unregister_fixup_for_uid (u32 phy_uid,u32 phy_uid_mask); -int phy_eee_tx_clock_stop_capable (struct phy_device *phydev);int phy_eee_rx_clock_stop (struct phy_device *phydev,bool clk_stop_enable);int phy_init_eee (struct phy_device *phydev,bool clk_stop_enable);
Signature · 1 line
2.52.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 13 Jan 2026 08:23:17 +0100 you wrote:
No user of PHY fixups unregisters these. IOW: The fixup unregistering functions are unused and can be removed. Remove also documentation for these functions. Whilst at it, remove also mentioning of
phy_register_fixup()from the Documentation, as this function has been static sinceea47e70e476f("net: phy: remove fixup-related definitions fromphy.hwhich are not used outside phylib").[...]
Here is the summary with links:
- [v2,net-next] net: phy: remove unused fixup unregistering functions
https://git.kernel.org/netdev/net-next/c/b1b77c82cec1
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html