* [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev
@ 2023-05-26 11:44 Russell King (Oracle)
2023-05-27 12:07 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2023-05-26 11:44 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Ioana Ciornei, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev
Rather than using put_device(&mdiodev->dev), use the proper interface
provided to dispose of the mdiodev - that being mdio_device_free().
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
This change is independent of the series I posted changing the lynx
PCS - since we're only subsituting an explicit put_device() for the
right interface in this driver, and this driver is not touched by
that series.
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
index b1871e6c4006..cb70855e2b9a 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
@@ -273,7 +273,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
mac->pcs = lynx_pcs_create(mdiodev);
if (!mac->pcs) {
netdev_err(mac->net_dev, "lynx_pcs_create() failed\n");
- put_device(&mdiodev->dev);
+ mdio_device_free(mdiodev);
return -ENOMEM;
}
@@ -286,10 +286,9 @@ static void dpaa2_pcs_destroy(struct dpaa2_mac *mac)
if (phylink_pcs) {
struct mdio_device *mdio = lynx_get_mdio_device(phylink_pcs);
- struct device *dev = &mdio->dev;
lynx_pcs_destroy(phylink_pcs);
- put_device(dev);
+ mdio_device_free(mdio);
mac->pcs = NULL;
}
}
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev
2023-05-26 11:44 [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev Russell King (Oracle)
@ 2023-05-27 12:07 ` Simon Horman
2023-05-29 17:09 ` Ioana Ciornei
2023-05-30 5:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-05-27 12:07 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, Ioana Ciornei, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev
On Fri, May 26, 2023 at 12:44:43PM +0100, Russell King (Oracle) wrote:
> Rather than using put_device(&mdiodev->dev), use the proper interface
> provided to dispose of the mdiodev - that being mdio_device_free().
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> This change is independent of the series I posted changing the lynx
> PCS - since we're only subsituting an explicit put_device() for the
> right interface in this driver, and this driver is not touched by
> that series.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev
2023-05-26 11:44 [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev Russell King (Oracle)
2023-05-27 12:07 ` Simon Horman
@ 2023-05-29 17:09 ` Ioana Ciornei
2023-05-30 5:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Ioana Ciornei @ 2023-05-29 17:09 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev
On Fri, May 26, 2023 at 12:44:43PM +0100, Russell King (Oracle) wrote:
> Rather than using put_device(&mdiodev->dev), use the proper interface
> provided to dispose of the mdiodev - that being mdio_device_free().
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev
2023-05-26 11:44 [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev Russell King (Oracle)
2023-05-27 12:07 ` Simon Horman
2023-05-29 17:09 ` Ioana Ciornei
@ 2023-05-30 5:00 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-30 5:00 UTC (permalink / raw)
To: Russell King
Cc: andrew, hkallweit1, ioana.ciornei, davem, edumazet, kuba, pabeni,
netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 26 May 2023 12:44:43 +0100 you wrote:
> Rather than using put_device(&mdiodev->dev), use the proper interface
> provided to dispose of the mdiodev - that being mdio_device_free().
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> This change is independent of the series I posted changing the lynx
> PCS - since we're only subsituting an explicit put_device() for the
> right interface in this driver, and this driver is not touched by
> that series.
>
> [...]
Here is the summary with links:
- [net-next] net: dpaa2-mac: use correct interface to free mdiodev
https://git.kernel.org/netdev/net-next/c/404621fab273
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] 4+ messages in thread
end of thread, other threads:[~2023-05-30 5:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-26 11:44 [PATCH net-next] net: dpaa2-mac: use correct interface to free mdiodev Russell King (Oracle)
2023-05-27 12:07 ` Simon Horman
2023-05-29 17:09 ` Ioana Ciornei
2023-05-30 5:00 ` 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;
as well as URLs for NNTP newsgroup(s).