* [PATCH net-next] net: phy: remove phy_attach
@ 2026-03-04 20:17 Heiner Kallweit
2026-03-07 0:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2026-03-04 20:17 UTC (permalink / raw)
To: Andrew Lunn, Russell King - ARM Linux, Paolo Abeni, Eric Dumazet,
David Miller, Jakub Kicinski
Cc: netdev@vger.kernel.org
378e6523ebb1 ("net: bcmgenet: remove unused platform code") removed
the last user of phy_attach(). So remove this function.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy_device.c | 38 ------------------------------------
include/linux/phy.h | 2 --
2 files changed, 40 deletions(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index c99ca5d3f6f..0edff47478c 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1895,44 +1895,6 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
}
EXPORT_SYMBOL(phy_attach_direct);
-/**
- * phy_attach - attach a network device to a particular PHY device
- * @dev: network device to attach
- * @bus_id: Bus ID of PHY device to attach
- * @interface: PHY device's interface
- *
- * Description: Same as phy_attach_direct() except that a PHY bus_id
- * string is passed instead of a pointer to a struct phy_device.
- */
-struct phy_device *phy_attach(struct net_device *dev, const char *bus_id,
- phy_interface_t interface)
-{
- struct phy_device *phydev;
- struct device *d;
- int rc;
-
- if (!dev)
- return ERR_PTR(-EINVAL);
-
- /* Search the list of PHY devices on the mdio bus for the
- * PHY with the requested name
- */
- d = bus_find_device_by_name(&mdio_bus_type, NULL, bus_id);
- if (!d) {
- pr_err("PHY %s not found\n", bus_id);
- return ERR_PTR(-ENODEV);
- }
- phydev = to_phy_device(d);
-
- rc = phy_attach_direct(dev, phydev, phydev->dev_flags, interface);
- put_device(d);
- if (rc)
- return ERR_PTR(rc);
-
- return phydev;
-}
-EXPORT_SYMBOL(phy_attach);
-
/**
* phy_detach - detach a PHY device from its network device
* @phydev: target phy_device struct
diff --git a/include/linux/phy.h b/include/linux/phy.h
index d065ebef659..5de4b172cd0 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -2152,8 +2152,6 @@ int phy_suspend(struct phy_device *phydev);
int phy_resume(struct phy_device *phydev);
int __phy_resume(struct phy_device *phydev);
int phy_loopback(struct phy_device *phydev, bool enable, int speed);
-struct phy_device *phy_attach(struct net_device *dev, const char *bus_id,
- phy_interface_t interface);
struct phy_device *phy_find_next(struct mii_bus *bus, struct phy_device *pos);
int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
u32 flags, phy_interface_t interface);
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: phy: remove phy_attach
2026-03-04 20:17 [PATCH net-next] net: phy: remove phy_attach Heiner Kallweit
@ 2026-03-07 0:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-07 0:50 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: andrew, linux, pabeni, edumazet, davem, kuba, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 4 Mar 2026 21:17:28 +0100 you wrote:
> 378e6523ebb1 ("net: bcmgenet: remove unused platform code") removed
> the last user of phy_attach(). So remove this function.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/net/phy/phy_device.c | 38 ------------------------------------
> include/linux/phy.h | 2 --
> 2 files changed, 40 deletions(-)
Here is the summary with links:
- [net-next] net: phy: remove phy_attach
https://git.kernel.org/netdev/net-next/c/260d27b3aec9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-07 0:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 20:17 [PATCH net-next] net: phy: remove phy_attach Heiner Kallweit
2026-03-07 0:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox