* [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe()
@ 2025-04-15 10:15 Russell King (Oracle)
2025-04-15 10:48 ` Maxime Chevallier
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2025-04-15 10:15 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexandre Torgue, Andrew Lunn, Chen-Yu Tsai, David S. Miller,
Eric Dumazet, Jakub Kicinski, Jernej Skrabec, linux-arm-kernel,
linux-stm32, linux-sunxi, Maxime Coquelin, netdev, Paolo Abeni,
Samuel Holland
Using stmmac_pltfr_probe() simplifies the probe function. This will not
only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit
(sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This
results in an overall simplification of the glue driver.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 85723a78793a..fd6518e252e3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1239,14 +1239,10 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = sun8i_dwmac_init(pdev, plat_dat->bsp_priv);
+ ret = stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
if (ret)
goto dwmac_syscon;
- ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (ret)
- goto dwmac_exit;
-
ndev = dev_get_drvdata(&pdev->dev);
priv = netdev_priv(ndev);
@@ -1283,9 +1279,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
clk_put(gmac->ephy_clk);
dwmac_remove:
pm_runtime_put_noidle(&pdev->dev);
- stmmac_dvr_remove(&pdev->dev);
-dwmac_exit:
- sun8i_dwmac_exit(pdev, gmac);
+ stmmac_pltfr_remove(pdev);
dwmac_syscon:
sun8i_dwmac_unset_syscon(gmac);
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe()
2025-04-15 10:15 [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe() Russell King (Oracle)
@ 2025-04-15 10:48 ` Maxime Chevallier
2025-04-15 12:36 ` Andrew Lunn
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Maxime Chevallier @ 2025-04-15 10:48 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, Alexandre Torgue, Andrew Lunn,
Chen-Yu Tsai, David S. Miller, Eric Dumazet, Jakub Kicinski,
Jernej Skrabec, linux-arm-kernel, linux-stm32, linux-sunxi,
Maxime Coquelin, netdev, Paolo Abeni, Samuel Holland
Hi Russell,
On Tue, 15 Apr 2025 11:15:53 +0100
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:
> Using stmmac_pltfr_probe() simplifies the probe function. This will not
> only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit
> (sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This
> results in an overall simplification of the glue driver.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe()
2025-04-15 10:15 [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe() Russell King (Oracle)
2025-04-15 10:48 ` Maxime Chevallier
@ 2025-04-15 12:36 ` Andrew Lunn
2025-04-15 13:56 ` Corentin Labbe
2025-04-17 1:41 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2025-04-15 12:36 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Heiner Kallweit, Alexandre Torgue, Andrew Lunn, Chen-Yu Tsai,
David S. Miller, Eric Dumazet, Jakub Kicinski, Jernej Skrabec,
linux-arm-kernel, linux-stm32, linux-sunxi, Maxime Coquelin,
netdev, Paolo Abeni, Samuel Holland
On Tue, Apr 15, 2025 at 11:15:53AM +0100, Russell King (Oracle) wrote:
> Using stmmac_pltfr_probe() simplifies the probe function. This will not
> only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit
> (sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This
> results in an overall simplification of the glue driver.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe()
2025-04-15 10:15 [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe() Russell King (Oracle)
2025-04-15 10:48 ` Maxime Chevallier
2025-04-15 12:36 ` Andrew Lunn
@ 2025-04-15 13:56 ` Corentin Labbe
2025-04-17 1:41 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Corentin Labbe @ 2025-04-15 13:56 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, Alexandre Torgue, Andrew Lunn,
Chen-Yu Tsai, David S. Miller, Eric Dumazet, Jakub Kicinski,
Jernej Skrabec, linux-arm-kernel, linux-stm32, linux-sunxi,
Maxime Coquelin, netdev, Paolo Abeni, Samuel Holland
Le Tue, Apr 15, 2025 at 11:15:53AM +0100, Russell King (Oracle) a écrit :
> Using stmmac_pltfr_probe() simplifies the probe function. This will not
> only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit
> (sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This
> results in an overall simplification of the glue driver.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-on: sun50i-h6-pine-h64
Tested-on: sun8i-a83t-bananapi-m3
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe()
2025-04-15 10:15 [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe() Russell King (Oracle)
` (2 preceding siblings ...)
2025-04-15 13:56 ` Corentin Labbe
@ 2025-04-17 1:41 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-17 1:41 UTC (permalink / raw)
To: Russell King
Cc: andrew, hkallweit1, alexandre.torgue, andrew+netdev, wens, davem,
edumazet, kuba, jernej.skrabec, linux-arm-kernel, linux-stm32,
linux-sunxi, mcoquelin.stm32, netdev, pabeni, samuel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 15 Apr 2025 11:15:53 +0100 you wrote:
> Using stmmac_pltfr_probe() simplifies the probe function. This will not
> only call plat_dat->init (sun8i_dwmac_init), but also plat_dat->exit
> (sun8i_dwmac_exit) appropriately if stmmac_dvr_probe() fails. This
> results in an overall simplification of the glue driver.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
>
> [...]
Here is the summary with links:
- [net-next] net: stmmac: sun8i: use stmmac_pltfr_probe()
https://git.kernel.org/netdev/net-next/c/4cc8b57753ef
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] 5+ messages in thread
end of thread, other threads:[~2025-04-17 1:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 10:15 [PATCH net-next] net: stmmac: sun8i: use stmmac_pltfr_probe() Russell King (Oracle)
2025-04-15 10:48 ` Maxime Chevallier
2025-04-15 12:36 ` Andrew Lunn
2025-04-15 13:56 ` Corentin Labbe
2025-04-17 1:41 ` 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).