* [PATCH net-next] net: phy: remove unused fixup unregistering functions
@ 2026-01-11 18:02 Heiner Kallweit
2026-01-13 3:41 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2026-01-11 18:02 UTC (permalink / raw)
To: Andrew Lunn, Andrew Lunn, Russell King - ARM Linux, Paolo Abeni,
Eric Dumazet, Jakub Kicinski, David Miller
Cc: netdev@vger.kernel.org
No user of PHY fixups unregisters these. IOW: The fixup unregistering
functions are unused and can be removed.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy_device.c | 46 ------------------------------------
include/linux/phy.h | 4 ----
2 files changed, 50 deletions(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 81984d4ebb7..95f5bb3ab59 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -474,52 +474,6 @@ int phy_register_fixup_for_id(const char *bus_id,
}
EXPORT_SYMBOL(phy_register_fixup_for_id);
-/**
- * phy_unregister_fixup - remove a phy_fixup from the list
- * @bus_id: A string matches fixup->bus_id (or PHY_ANY_ID) in phy_fixup_list
- * @phy_uid: A phy id matches fixup->phy_id (or PHY_ANY_UID) in phy_fixup_list
- * @phy_uid_mask: Applied to phy_uid and fixup->phy_uid before comparison
- */
-int phy_unregister_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask)
-{
- struct list_head *pos, *n;
- struct phy_fixup *fixup;
- int ret;
-
- ret = -ENODEV;
-
- mutex_lock(&phy_fixup_lock);
- list_for_each_safe(pos, n, &phy_fixup_list) {
- fixup = list_entry(pos, struct phy_fixup, list);
-
- if ((!strcmp(fixup->bus_id, bus_id)) &&
- phy_id_compare(fixup->phy_uid, phy_uid, phy_uid_mask)) {
- list_del(&fixup->list);
- kfree(fixup);
- ret = 0;
- break;
- }
- }
- mutex_unlock(&phy_fixup_lock);
-
- return ret;
-}
-EXPORT_SYMBOL(phy_unregister_fixup);
-
-/* Unregisters a fixup of any PHY with the UID in phy_uid */
-int phy_unregister_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask)
-{
- return phy_unregister_fixup(PHY_ANY_ID, phy_uid, phy_uid_mask);
-}
-EXPORT_SYMBOL(phy_unregister_fixup_for_uid);
-
-/* Unregisters a fixup of the PHY with id string bus_id */
-int phy_unregister_fixup_for_id(const char *bus_id)
-{
- return phy_unregister_fixup(bus_id, PHY_ANY_UID, 0xffffffff);
-}
-EXPORT_SYMBOL(phy_unregister_fixup_for_id);
-
/* Returns 1 if fixup matches phydev in bus_id and phy_uid.
* Fixups can be set to match any in one or more fields.
*/
diff --git a/include/linux/phy.h b/include/linux/phy.h
index fbbe028cc4b..082612ee954 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -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);
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: phy: remove unused fixup unregistering functions
2026-01-11 18:02 [PATCH net-next] net: phy: remove unused fixup unregistering functions Heiner Kallweit
@ 2026-01-13 3:41 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-01-13 3:41 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Andrew Lunn, Andrew Lunn, Russell King - ARM Linux, Paolo Abeni,
Eric Dumazet, David Miller, netdev@vger.kernel.org
On Sun, 11 Jan 2026 19:02:06 +0100 Heiner Kallweit wrote:
> No user of PHY fixups unregisters these. IOW: The fixup unregistering
> functions are unused and can be removed.
They seem to be referenced in Documentation/networking/phy.rst
Also would be good to add to the commit msg when they were last used or
if never used - when added (commit hash)
--
pw-bot: cr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-13 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 18:02 [PATCH net-next] net: phy: remove unused fixup unregistering functions Heiner Kallweit
2026-01-13 3:41 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox