* [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt
@ 2023-09-16 7:58 Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt() Jisheng Zhang
` (25 more replies)
0 siblings, 26 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Russell pointed out there's a new devm_stmmac_probe_config_dt()
helper now when reviewing my starfive gmac error handling patch[1].
After greping the code, this nice helper was introduced by Bartosz in
[2], I think it's time to convert all dwmac users to this helper and
finally complete the TODO in [2] "but once all users of the old
stmmac_pltfr_remove() are converted to the devres helper, it will be
renamed back to stmmac_pltfr_remove() and the no_dt function removed."
Link: https://lore.kernel.org/netdev/ZOtWmedBsa6wQQ6+@shell.armlinux.org.uk/ [1]
Link: https://lore.kernel.org/all/20230623100417.93592-1-brgl@bgdev.pl/ [2]
Since v1:
- rebase on new net-next
- add make stmmac_{probe|remove}_config_dt static as suggested by Russell.
Jisheng Zhang (23):
net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-generic: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe()
net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-ingenic: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-ipq806x: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-lpc18xx: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-mediatek: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-meson: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-meson8b: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-rk: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-socfpga: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-starfive: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-sti: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-stm32: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-tegra: use devm_stmmac_probe_config_dt()
net: stmmac: dwmac-visconti: use devm_stmmac_probe_config_dt()
net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove
net: stmmac: make stmmac_{probe|remove}_config_dt static
.../ethernet/stmicro/stmmac/dwmac-anarion.c | 10 +--
.../stmicro/stmmac/dwmac-dwc-qos-eth.c | 15 +---
.../ethernet/stmicro/stmmac/dwmac-generic.c | 15 +---
.../net/ethernet/stmicro/stmmac/dwmac-imx.c | 13 ++--
.../ethernet/stmicro/stmmac/dwmac-ingenic.c | 33 +++------
.../stmicro/stmmac/dwmac-intel-plat.c | 25 +++----
.../ethernet/stmicro/stmmac/dwmac-ipq806x.c | 27 +++----
.../ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 19 ++---
.../ethernet/stmicro/stmmac/dwmac-mediatek.c | 6 +-
.../net/ethernet/stmicro/stmmac/dwmac-meson.c | 25 ++-----
.../ethernet/stmicro/stmmac/dwmac-meson8b.c | 53 +++++---------
.../net/ethernet/stmicro/stmmac/dwmac-rk.c | 14 ++--
.../ethernet/stmicro/stmmac/dwmac-socfpga.c | 16 ++---
.../ethernet/stmicro/stmmac/dwmac-starfive.c | 10 +--
.../net/ethernet/stmicro/stmmac/dwmac-sti.c | 14 ++--
.../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 17 ++---
.../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 +-
.../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 23 +++---
.../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 10 ++-
.../ethernet/stmicro/stmmac/dwmac-visconti.c | 18 ++---
.../ethernet/stmicro/stmmac/stmmac_platform.c | 70 ++++++-------------
.../ethernet/stmicro/stmmac/stmmac_platform.h | 5 --
22 files changed, 127 insertions(+), 317 deletions(-)
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-18 19:27 ` Serge Semin
2023-09-16 7:58 ` [PATCH net-next v2 02/23] net: stmmac: dwmac-dwc-qos-eth: " Jisheng Zhang
` (24 subsequent siblings)
25 siblings, 1 reply; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
index 58a7f08e8d78..0df3a2ad0986 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
@@ -115,7 +115,7 @@ static int anarion_dwmac_probe(struct platform_device *pdev)
if (IS_ERR(gmac))
return PTR_ERR(gmac);
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
@@ -124,13 +124,7 @@ static int anarion_dwmac_probe(struct platform_device *pdev)
anarion_gmac_init(pdev, gmac);
plat_dat->bsp_priv = gmac;
- ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (ret) {
- stmmac_remove_config_dt(pdev, plat_dat);
- return ret;
- }
-
- return 0;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
static const struct of_device_id anarion_dwmac_match[] = {
@@ -141,7 +135,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match);
static struct platform_driver anarion_dwmac_driver = {
.probe = anarion_dwmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "anarion-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 02/23] net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt() Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-18 19:11 ` Serge Semin
2023-09-16 7:58 ` [PATCH net-next v2 03/23] net: stmmac: dwmac-generic: " Jisheng Zhang
` (23 subsequent siblings)
25 siblings, 1 reply; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
index 61ebf36da13d..ec924c6c76c6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -435,15 +435,14 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)
if (IS_ERR(stmmac_res.addr))
return PTR_ERR(stmmac_res.addr);
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
ret = data->probe(pdev, plat_dat, &stmmac_res);
if (ret < 0) {
dev_err_probe(&pdev->dev, ret, "failed to probe subdriver\n");
-
- goto remove_config;
+ return ret;
}
ret = dwc_eth_dwmac_config_dt(pdev, plat_dat);
@@ -458,25 +457,17 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)
remove:
data->remove(pdev);
-remove_config:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
static void dwc_eth_dwmac_remove(struct platform_device *pdev)
{
- struct net_device *ndev = platform_get_drvdata(pdev);
- struct stmmac_priv *priv = netdev_priv(ndev);
- const struct dwc_eth_dwmac_data *data;
-
- data = device_get_match_data(&pdev->dev);
+ const struct dwc_eth_dwmac_data *data = device_get_match_data(&pdev->dev);
stmmac_dvr_remove(&pdev->dev);
data->remove(pdev);
-
- stmmac_remove_config_dt(pdev, priv->plat);
}
static const struct of_device_id dwc_eth_dwmac_match[] = {
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 03/23] net: stmmac: dwmac-generic: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt() Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 02/23] net: stmmac: dwmac-dwc-qos-eth: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 04/23] net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe() Jisheng Zhang
` (22 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../net/ethernet/stmicro/stmmac/dwmac-generic.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index 20fc455b3337..84582fc04d2e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -27,7 +27,7 @@ static int dwmac_generic_probe(struct platform_device *pdev)
return ret;
if (pdev->dev.of_node) {
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat)) {
dev_err(&pdev->dev, "dt configuration failed\n");
return PTR_ERR(plat_dat);
@@ -46,17 +46,7 @@ static int dwmac_generic_probe(struct platform_device *pdev)
plat_dat->unicast_filter_entries = 1;
}
- ret = stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
- if (ret)
- goto err_remove_config_dt;
-
- return 0;
-
-err_remove_config_dt:
- if (pdev->dev.of_node)
- stmmac_remove_config_dt(pdev, plat_dat);
-
- return ret;
+ return stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
}
static const struct of_device_id dwmac_generic_match[] = {
@@ -77,7 +67,7 @@ MODULE_DEVICE_TABLE(of, dwmac_generic_match);
static struct platform_driver dwmac_generic_driver = {
.probe = dwmac_generic_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = STMMAC_RESOURCE_NAME,
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 04/23] net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (2 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 03/23] net: stmmac: dwmac-generic: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 05/23] net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt() Jisheng Zhang
` (21 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Use the devres variant of stmmac_pltfr_probe() and finally drop the
remove() hook.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index 84582fc04d2e..598eff926815 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -46,7 +46,7 @@ static int dwmac_generic_probe(struct platform_device *pdev)
plat_dat->unicast_filter_entries = 1;
}
- return stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
+ return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
}
static const struct of_device_id dwmac_generic_match[] = {
@@ -67,7 +67,6 @@ MODULE_DEVICE_TABLE(of, dwmac_generic_match);
static struct platform_driver dwmac_generic_driver = {
.probe = dwmac_generic_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = STMMAC_RESOURCE_NAME,
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 05/23] net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (3 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 04/23] net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe() Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 06/23] net: stmmac: dwmac-ingenic: " Jisheng Zhang
` (20 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
index df34e34cc14f..e5989424894b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -331,15 +331,14 @@ static int imx_dwmac_probe(struct platform_device *pdev)
if (!dwmac)
return -ENOMEM;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
data = of_device_get_match_data(&pdev->dev);
if (!data) {
dev_err(&pdev->dev, "failed to get match data\n");
- ret = -EINVAL;
- goto err_match_data;
+ return -EINVAL;
}
dwmac->ops = data;
@@ -348,7 +347,7 @@ static int imx_dwmac_probe(struct platform_device *pdev)
ret = imx_dwmac_parse_dt(dwmac, &pdev->dev);
if (ret) {
dev_err(&pdev->dev, "failed to parse OF data\n");
- goto err_parse_dt;
+ return ret;
}
if (data->flags & STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY)
@@ -365,7 +364,7 @@ static int imx_dwmac_probe(struct platform_device *pdev)
ret = imx_dwmac_clks_config(dwmac, true);
if (ret)
- goto err_clks_config;
+ return ret;
ret = imx_dwmac_init(pdev, dwmac);
if (ret)
@@ -385,10 +384,6 @@ static int imx_dwmac_probe(struct platform_device *pdev)
imx_dwmac_exit(pdev, plat_dat->bsp_priv);
err_dwmac_init:
imx_dwmac_clks_config(dwmac, false);
-err_clks_config:
-err_parse_dt:
-err_match_data:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
@@ -423,7 +418,7 @@ MODULE_DEVICE_TABLE(of, imx_dwmac_match);
static struct platform_driver imx_dwmac_driver = {
.probe = imx_dwmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "imx-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 06/23] net: stmmac: dwmac-ingenic: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (4 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 05/23] net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt() Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 07/23] net: stmmac: dwmac-intel-plat: " Jisheng Zhang
` (19 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-ingenic.c | 35 ++++++-------------
1 file changed, 10 insertions(+), 25 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
index 0a20c3d24722..3f87053ffc07 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
@@ -241,29 +241,25 @@ static int ingenic_mac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
mac = devm_kzalloc(&pdev->dev, sizeof(*mac), GFP_KERNEL);
- if (!mac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!mac)
+ return -ENOMEM;
data = of_device_get_match_data(&pdev->dev);
if (!data) {
dev_err(&pdev->dev, "No of match data provided\n");
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
/* Get MAC PHY control register */
mac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "mode-reg");
if (IS_ERR(mac->regmap)) {
dev_err(&pdev->dev, "%s: Failed to get syscon regmap\n", __func__);
- ret = PTR_ERR(mac->regmap);
- goto err_remove_config_dt;
+ return PTR_ERR(mac->regmap);
}
if (!of_property_read_u32(pdev->dev.of_node, "tx-clk-delay-ps", &tx_delay_ps)) {
@@ -272,8 +268,7 @@ static int ingenic_mac_probe(struct platform_device *pdev)
mac->tx_delay = tx_delay_ps * 1000;
} else {
dev_err(&pdev->dev, "Invalid TX clock delay: %dps\n", tx_delay_ps);
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
}
@@ -283,8 +278,7 @@ static int ingenic_mac_probe(struct platform_device *pdev)
mac->rx_delay = rx_delay_ps * 1000;
} else {
dev_err(&pdev->dev, "Invalid RX clock delay: %dps\n", rx_delay_ps);
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
}
@@ -295,18 +289,9 @@ static int ingenic_mac_probe(struct platform_device *pdev)
ret = ingenic_mac_init(plat_dat);
if (ret)
- goto err_remove_config_dt;
-
- ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (ret)
- goto err_remove_config_dt;
-
- return 0;
-
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
+ return ret;
- return ret;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
#ifdef CONFIG_PM_SLEEP
@@ -385,7 +370,7 @@ MODULE_DEVICE_TABLE(of, ingenic_mac_of_matches);
static struct platform_driver ingenic_mac_driver = {
.probe = ingenic_mac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "ingenic-mac",
.pm = pm_ptr(&ingenic_mac_pm_ops),
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 07/23] net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (5 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 06/23] net: stmmac: dwmac-ingenic: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-18 19:47 ` Serge Semin
2023-09-16 7:58 ` [PATCH net-next v2 08/23] net: stmmac: dwmac-ipq806x: " Jisheng Zhang
` (18 subsequent siblings)
25 siblings, 1 reply; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The calling of stmmac_pltfr_remove() now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../stmicro/stmmac/dwmac-intel-plat.c | 27 +++++++------------
1 file changed, 9 insertions(+), 18 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
index d352a14f9d48..d1aec2ca2b42 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
@@ -85,17 +85,15 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat)) {
dev_err(&pdev->dev, "dt configuration failed\n");
return PTR_ERR(plat_dat);
}
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!dwmac)
+ return -ENOMEM;
dwmac->dev = &pdev->dev;
dwmac->tx_clk = NULL;
@@ -110,10 +108,8 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
/* Enable TX clock */
if (dwmac->data->tx_clk_en) {
dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk");
- if (IS_ERR(dwmac->tx_clk)) {
- ret = PTR_ERR(dwmac->tx_clk);
- goto err_remove_config_dt;
- }
+ if (IS_ERR(dwmac->tx_clk))
+ return PTR_ERR(dwmac->tx_clk);
clk_prepare_enable(dwmac->tx_clk);
@@ -126,7 +122,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev,
"Failed to set tx_clk\n");
- goto err_remove_config_dt;
+ return ret;
}
}
}
@@ -140,7 +136,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev,
"Failed to set clk_ptp_ref\n");
- goto err_remove_config_dt;
+ return ret;
}
}
}
@@ -158,22 +154,17 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret) {
clk_disable_unprepare(dwmac->tx_clk);
- goto err_remove_config_dt;
+ return ret;
}
return 0;
-
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
-
- return ret;
}
static void intel_eth_plat_remove(struct platform_device *pdev)
{
struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
- stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove_no_dt(pdev);
clk_disable_unprepare(dwmac->tx_clk);
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 08/23] net: stmmac: dwmac-ipq806x: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (6 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 07/23] net: stmmac: dwmac-intel-plat: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 09/23] net: stmmac: dwmac-lpc18xx: " Jisheng Zhang
` (17 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-ipq806x.c | 29 ++++++-------------
1 file changed, 9 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
index 9b0200749109..a9916fd07616 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
@@ -384,22 +384,20 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
if (val)
return val;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
gmac = devm_kzalloc(dev, sizeof(*gmac), GFP_KERNEL);
- if (!gmac) {
- err = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!gmac)
+ return -ENOMEM;
gmac->pdev = pdev;
err = ipq806x_gmac_of_parse(gmac);
if (err) {
dev_err(dev, "device tree parsing error\n");
- goto err_remove_config_dt;
+ return err;
}
regmap_write(gmac->qsgmii_csr, QSGMII_PCS_CAL_LCKDT_CTL,
@@ -459,11 +457,11 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
if (gmac->phy_mode == PHY_INTERFACE_MODE_SGMII) {
err = ipq806x_gmac_configure_qsgmii_params(gmac);
if (err)
- goto err_remove_config_dt;
+ return err;
err = ipq806x_gmac_configure_qsgmii_pcs_speed(gmac);
if (err)
- goto err_remove_config_dt;
+ return err;
}
plat_dat->has_gmac = true;
@@ -473,21 +471,12 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
plat_dat->tx_fifo_size = 8192;
plat_dat->rx_fifo_size = 8192;
- err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (err)
- goto err_remove_config_dt;
-
- return 0;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
err_unsupported_phy:
dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n",
phy_modes(gmac->phy_mode));
- err = -EINVAL;
-
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
-
- return err;
+ return -EINVAL;
}
static const struct of_device_id ipq806x_gmac_dwmac_match[] = {
@@ -498,7 +487,7 @@ MODULE_DEVICE_TABLE(of, ipq806x_gmac_dwmac_match);
static struct platform_driver ipq806x_gmac_dwmac_driver = {
.probe = ipq806x_gmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "ipq806x-gmac-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 09/23] net: stmmac: dwmac-lpc18xx: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (7 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 08/23] net: stmmac: dwmac-ipq806x: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 10/23] net: stmmac: dwmac-mediatek: " Jisheng Zhang
` (16 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 21 +++++--------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
index d0aa674ce705..dad23b47f383 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
@@ -37,7 +37,7 @@ static int lpc18xx_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
@@ -46,8 +46,7 @@ static int lpc18xx_dwmac_probe(struct platform_device *pdev)
reg = syscon_regmap_lookup_by_compatible("nxp,lpc1850-creg");
if (IS_ERR(reg)) {
dev_err(&pdev->dev, "syscon lookup failed\n");
- ret = PTR_ERR(reg);
- goto err_remove_config_dt;
+ return PTR_ERR(reg);
}
if (plat_dat->mac_interface == PHY_INTERFACE_MODE_MII) {
@@ -56,23 +55,13 @@ static int lpc18xx_dwmac_probe(struct platform_device *pdev)
ethmode = LPC18XX_CREG_CREG6_ETHMODE_RMII;
} else {
dev_err(&pdev->dev, "Only MII and RMII mode supported\n");
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
regmap_update_bits(reg, LPC18XX_CREG_CREG6,
LPC18XX_CREG_CREG6_ETHMODE_MASK, ethmode);
- ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (ret)
- goto err_remove_config_dt;
-
- return 0;
-
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
-
- return ret;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
static const struct of_device_id lpc18xx_dwmac_match[] = {
@@ -83,7 +72,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_dwmac_match);
static struct platform_driver lpc18xx_dwmac_driver = {
.probe = lpc18xx_dwmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "lpc18xx-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 10/23] net: stmmac: dwmac-mediatek: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (8 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 09/23] net: stmmac: dwmac-lpc18xx: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 11/23] net: stmmac: dwmac-meson: " Jisheng Zhang
` (15 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The calling of stmmac_pltfr_remove() now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index cd796ec04132..11976a854240 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -656,7 +656,7 @@ static int mediatek_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
@@ -665,7 +665,7 @@ static int mediatek_dwmac_probe(struct platform_device *pdev)
ret = mediatek_dwmac_clks_config(priv_plat, true);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret)
@@ -675,8 +675,6 @@ static int mediatek_dwmac_probe(struct platform_device *pdev)
err_drv_probe:
mediatek_dwmac_clks_config(priv_plat, false);
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
@@ -685,7 +683,7 @@ static void mediatek_dwmac_remove(struct platform_device *pdev)
{
struct mediatek_dwmac_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev);
- stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove_no_dt(pdev);
mediatek_dwmac_clks_config(priv_plat, false);
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 11/23] net: stmmac: dwmac-meson: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (9 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 10/23] net: stmmac: dwmac-mediatek: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 12/23] net: stmmac: dwmac-meson8b: " Jisheng Zhang
` (14 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../net/ethernet/stmicro/stmmac/dwmac-meson.c | 27 +++++--------------
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
index 959f88c6da16..3373d3ec2368 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
@@ -52,35 +52,22 @@ static int meson6_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!dwmac)
+ return -ENOMEM;
dwmac->reg = devm_platform_ioremap_resource(pdev, 1);
- if (IS_ERR(dwmac->reg)) {
- ret = PTR_ERR(dwmac->reg);
- goto err_remove_config_dt;
- }
+ if (IS_ERR(dwmac->reg))
+ return PTR_ERR(dwmac->reg);
plat_dat->bsp_priv = dwmac;
plat_dat->fix_mac_speed = meson6_dwmac_fix_mac_speed;
- ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (ret)
- goto err_remove_config_dt;
-
- return 0;
-
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
-
- return ret;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
static const struct of_device_id meson6_dwmac_match[] = {
@@ -91,7 +78,7 @@ MODULE_DEVICE_TABLE(of, meson6_dwmac_match);
static struct platform_driver meson6_dwmac_driver = {
.probe = meson6_dwmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "meson6-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 12/23] net: stmmac: dwmac-meson8b: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (10 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 11/23] net: stmmac: dwmac-meson: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 13/23] net: stmmac: dwmac-rk: " Jisheng Zhang
` (13 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-meson8b.c | 55 ++++++-------------
1 file changed, 18 insertions(+), 37 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
index 0b159dc0d5f6..37f249980929 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
@@ -400,33 +400,27 @@ static int meson8b_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!dwmac)
+ return -ENOMEM;
dwmac->data = (const struct meson8b_dwmac_data *)
of_device_get_match_data(&pdev->dev);
- if (!dwmac->data) {
- ret = -EINVAL;
- goto err_remove_config_dt;
- }
+ if (!dwmac->data)
+ return -EINVAL;
dwmac->regs = devm_platform_ioremap_resource(pdev, 1);
- if (IS_ERR(dwmac->regs)) {
- ret = PTR_ERR(dwmac->regs);
- goto err_remove_config_dt;
- }
+ if (IS_ERR(dwmac->regs))
+ return PTR_ERR(dwmac->regs);
dwmac->dev = &pdev->dev;
ret = of_get_phy_mode(pdev->dev.of_node, &dwmac->phy_mode);
if (ret) {
dev_err(&pdev->dev, "missing phy-mode property\n");
- goto err_remove_config_dt;
+ return ret;
}
/* use 2ns as fallback since this value was previously hardcoded */
@@ -448,53 +442,40 @@ static int meson8b_dwmac_probe(struct platform_device *pdev)
if (dwmac->rx_delay_ps > 3000 || dwmac->rx_delay_ps % 200) {
dev_err(dwmac->dev,
"The RGMII RX delay range is 0..3000ps in 200ps steps");
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
} else {
if (dwmac->rx_delay_ps != 0 && dwmac->rx_delay_ps != 2000) {
dev_err(dwmac->dev,
"The only allowed RGMII RX delays values are: 0ps, 2000ps");
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
}
dwmac->timing_adj_clk = devm_clk_get_optional(dwmac->dev,
"timing-adjustment");
- if (IS_ERR(dwmac->timing_adj_clk)) {
- ret = PTR_ERR(dwmac->timing_adj_clk);
- goto err_remove_config_dt;
- }
+ if (IS_ERR(dwmac->timing_adj_clk))
+ return PTR_ERR(dwmac->timing_adj_clk);
ret = meson8b_init_rgmii_delays(dwmac);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = meson8b_init_rgmii_tx_clk(dwmac);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = dwmac->data->set_phy_mode(dwmac);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = meson8b_init_prg_eth(dwmac);
if (ret)
- goto err_remove_config_dt;
+ return ret;
plat_dat->bsp_priv = dwmac;
- ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (ret)
- goto err_remove_config_dt;
-
- return 0;
-
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
-
- return ret;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
static const struct meson8b_dwmac_data meson8b_dwmac_data = {
@@ -539,7 +520,7 @@ MODULE_DEVICE_TABLE(of, meson8b_dwmac_match);
static struct platform_driver meson8b_dwmac_driver = {
.probe = meson8b_dwmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "meson8b-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 13/23] net: stmmac: dwmac-rk: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (11 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 12/23] net: stmmac: dwmac-meson8b: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 14/23] net: stmmac: dwmac-socfpga: " Jisheng Zhang
` (12 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index d920a50dd16c..382e8de1255d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1824,7 +1824,7 @@ static int rk_gmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
@@ -1836,18 +1836,16 @@ static int rk_gmac_probe(struct platform_device *pdev)
plat_dat->fix_mac_speed = rk_fix_speed;
plat_dat->bsp_priv = rk_gmac_setup(pdev, plat_dat, data);
- if (IS_ERR(plat_dat->bsp_priv)) {
- ret = PTR_ERR(plat_dat->bsp_priv);
- goto err_remove_config_dt;
- }
+ if (IS_ERR(plat_dat->bsp_priv))
+ return PTR_ERR(plat_dat->bsp_priv);
ret = rk_gmac_clk_init(plat_dat);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = rk_gmac_powerup(plat_dat->bsp_priv);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret)
@@ -1857,8 +1855,6 @@ static int rk_gmac_probe(struct platform_device *pdev)
err_gmac_powerdown:
rk_gmac_powerdown(plat_dat->bsp_priv);
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 14/23] net: stmmac: dwmac-socfpga: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (12 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 13/23] net: stmmac: dwmac-rk: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 15/23] net: stmmac: dwmac-starfive: " Jisheng Zhang
` (11 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The calling of stmmac_pltfr_remove() now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-socfpga.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 9bf102bbc6a0..03e7701d0186 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -400,21 +400,19 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
dwmac = devm_kzalloc(dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!dwmac)
+ return -ENOMEM;
dwmac->stmmac_ocp_rst = devm_reset_control_get_optional(dev, "stmmaceth-ocp");
if (IS_ERR(dwmac->stmmac_ocp_rst)) {
ret = PTR_ERR(dwmac->stmmac_ocp_rst);
dev_err(dev, "error getting reset control of ocp %d\n", ret);
- goto err_remove_config_dt;
+ return ret;
}
reset_control_deassert(dwmac->stmmac_ocp_rst);
@@ -422,7 +420,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
ret = socfpga_dwmac_parse_data(dwmac, dev);
if (ret) {
dev_err(dev, "Unable to parse OF data\n");
- goto err_remove_config_dt;
+ return ret;
}
dwmac->ops = ops;
@@ -431,7 +429,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ndev = platform_get_drvdata(pdev);
stpriv = netdev_priv(ndev);
@@ -492,8 +490,6 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
err_dvr_remove:
stmmac_dvr_remove(&pdev->dev);
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
@@ -504,7 +500,7 @@ static void socfpga_dwmac_remove(struct platform_device *pdev)
struct stmmac_priv *priv = netdev_priv(ndev);
struct phylink_pcs *pcs = priv->hw->lynx_pcs;
- stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove_no_dt(pdev);
lynx_pcs_destroy(pcs);
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 15/23] net: stmmac: dwmac-starfive: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (13 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 14/23] net: stmmac: dwmac-socfpga: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 16/23] net: stmmac: dwmac-sti: " Jisheng Zhang
` (10 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index 9289bb87c3e3..e87b4d335c72 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -105,7 +105,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, err,
"failed to get resources\n");
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return dev_err_probe(&pdev->dev, PTR_ERR(plat_dat),
"dt configuration failed\n");
@@ -141,13 +141,7 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
if (err)
return err;
- err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
- if (err) {
- stmmac_remove_config_dt(pdev, plat_dat);
- return err;
- }
-
- return 0;
+ return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
}
static const struct of_device_id starfive_dwmac_match[] = {
@@ -158,7 +152,7 @@ MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
static struct platform_driver starfive_dwmac_driver = {
.probe = starfive_dwmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "starfive-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 16/23] net: stmmac: dwmac-sti: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (14 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 15/23] net: stmmac: dwmac-starfive: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 17/23] net: stmmac: dwmac-stm32: " Jisheng Zhang
` (9 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 0d653bbb931b..4445cddc4cbe 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -273,20 +273,18 @@ static int sti_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!dwmac)
+ return -ENOMEM;
ret = sti_dwmac_parse_data(dwmac, pdev);
if (ret) {
dev_err(&pdev->dev, "Unable to parse OF data\n");
- goto err_remove_config_dt;
+ return ret;
}
dwmac->fix_retime_src = data->fix_retime_src;
@@ -296,7 +294,7 @@ static int sti_dwmac_probe(struct platform_device *pdev)
ret = clk_prepare_enable(dwmac->clk);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = sti_dwmac_set_mode(dwmac);
if (ret)
@@ -310,8 +308,6 @@ static int sti_dwmac_probe(struct platform_device *pdev)
disable_clk:
clk_disable_unprepare(dwmac->clk);
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 17/23] net: stmmac: dwmac-stm32: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (15 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 16/23] net: stmmac: dwmac-sti: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 18/23] net: stmmac: dwmac-sun8i: " Jisheng Zhang
` (8 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 26ea8c687881..ab4324ed46da 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -370,21 +370,18 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!dwmac)
+ return -ENOMEM;
data = of_device_get_match_data(&pdev->dev);
if (!data) {
dev_err(&pdev->dev, "no of match data provided\n");
- ret = -EINVAL;
- goto err_remove_config_dt;
+ return -EINVAL;
}
dwmac->ops = data;
@@ -393,14 +390,14 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
ret = stm32_dwmac_parse_data(dwmac, &pdev->dev);
if (ret) {
dev_err(&pdev->dev, "Unable to parse OF data\n");
- goto err_remove_config_dt;
+ return ret;
}
plat_dat->bsp_priv = dwmac;
ret = stm32_dwmac_init(plat_dat);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret)
@@ -410,8 +407,6 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
err_clk_disable:
stm32_dwmac_clk_disable(dwmac);
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 18/23] net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (16 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 17/23] net: stmmac: dwmac-stm32: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-17 14:42 ` Jernej Škrabec
2023-09-16 7:58 ` [PATCH net-next v2 19/23] net: stmmac: dwmac-sunxi: " Jisheng Zhang
` (7 subsequent siblings)
25 siblings, 1 reply; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The calling of stmmac_pltfr_remove() now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 01e77368eef1..63a7e5e53d7b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1224,7 +1224,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
if (ret)
return -EINVAL;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
@@ -1244,7 +1244,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
ret = sun8i_dwmac_set_syscon(&pdev->dev, plat_dat);
if (ret)
- goto dwmac_deconfig;
+ return ret;
ret = sun8i_dwmac_init(pdev, plat_dat->bsp_priv);
if (ret)
@@ -1295,8 +1295,6 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
sun8i_dwmac_exit(pdev, gmac);
dwmac_syscon:
sun8i_dwmac_unset_syscon(gmac);
-dwmac_deconfig:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
@@ -1314,7 +1312,7 @@ static void sun8i_dwmac_remove(struct platform_device *pdev)
clk_put(gmac->ephy_clk);
}
- stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove_no_dt(pdev);
sun8i_dwmac_unset_syscon(gmac);
}
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 19/23] net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (17 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 18/23] net: stmmac: dwmac-sun8i: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-17 14:43 ` Jernej Škrabec
2023-09-16 7:58 ` [PATCH net-next v2 20/23] net: stmmac: dwmac-tegra: " Jisheng Zhang
` (6 subsequent siblings)
25 siblings, 1 reply; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The remove_new() callback now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 25 +++++++------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
index beceeae579bf..b857235f5b1f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
@@ -108,36 +108,31 @@ static int sun7i_gmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
gmac = devm_kzalloc(dev, sizeof(*gmac), GFP_KERNEL);
- if (!gmac) {
- ret = -ENOMEM;
- goto err_remove_config_dt;
- }
+ if (!gmac)
+ return -ENOMEM;
ret = of_get_phy_mode(dev->of_node, &gmac->interface);
if (ret && ret != -ENODEV) {
dev_err(dev, "Can't get phy-mode\n");
- goto err_remove_config_dt;
+ return ret;
}
gmac->tx_clk = devm_clk_get(dev, "allwinner_gmac_tx");
if (IS_ERR(gmac->tx_clk)) {
dev_err(dev, "could not get tx clock\n");
- ret = PTR_ERR(gmac->tx_clk);
- goto err_remove_config_dt;
+ return PTR_ERR(gmac->tx_clk);
}
/* Optional regulator for PHY */
gmac->regulator = devm_regulator_get_optional(dev, "phy");
if (IS_ERR(gmac->regulator)) {
- if (PTR_ERR(gmac->regulator) == -EPROBE_DEFER) {
- ret = -EPROBE_DEFER;
- goto err_remove_config_dt;
- }
+ if (PTR_ERR(gmac->regulator) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
dev_info(dev, "no regulator found\n");
gmac->regulator = NULL;
}
@@ -155,7 +150,7 @@ static int sun7i_gmac_probe(struct platform_device *pdev)
ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv);
if (ret)
- goto err_remove_config_dt;
+ return ret;
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret)
@@ -165,8 +160,6 @@ static int sun7i_gmac_probe(struct platform_device *pdev)
err_gmac_exit:
sun7i_gmac_exit(pdev, plat_dat->bsp_priv);
-err_remove_config_dt:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
@@ -179,7 +172,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match);
static struct platform_driver sun7i_dwmac_driver = {
.probe = sun7i_gmac_probe,
- .remove_new = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove_no_dt,
.driver = {
.name = "sun7i-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 20/23] net: stmmac: dwmac-tegra: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (18 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 19/23] net: stmmac: dwmac-sunxi: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 21/23] net: stmmac: dwmac-visconti: " Jisheng Zhang
` (5 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The calling of stmmac_pltfr_remove() now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
index e0f3cbd36852..7e512c0762ea 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
@@ -284,7 +284,7 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
if (err < 0)
goto disable_clks;
- plat = stmmac_probe_config_dt(pdev, res.mac);
+ plat = devm_stmmac_probe_config_dt(pdev, res.mac);
if (IS_ERR(plat)) {
err = PTR_ERR(plat);
goto disable_clks;
@@ -303,7 +303,7 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
GFP_KERNEL);
if (!plat->mdio_bus_data) {
err = -ENOMEM;
- goto remove;
+ goto disable_clks;
}
}
@@ -321,7 +321,7 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
500, 500 * 2000);
if (err < 0) {
dev_err(mgbe->dev, "timeout waiting for TX lane to become enabled\n");
- goto remove;
+ goto disable_clks;
}
plat->serdes_powerup = mgbe_uphy_lane_bringup_serdes_up;
@@ -342,12 +342,10 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
err = stmmac_dvr_probe(&pdev->dev, plat, &res);
if (err < 0)
- goto remove;
+ goto disable_clks;
return 0;
-remove:
- stmmac_remove_config_dt(pdev, plat);
disable_clks:
clk_bulk_disable_unprepare(ARRAY_SIZE(mgbe_clks), mgbe->clks);
@@ -360,7 +358,7 @@ static void tegra_mgbe_remove(struct platform_device *pdev)
clk_bulk_disable_unprepare(ARRAY_SIZE(mgbe_clks), mgbe->clks);
- stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove_no_dt(pdev);
}
static const struct of_device_id tegra_mgbe_match[] = {
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 21/23] net: stmmac: dwmac-visconti: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (19 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 20/23] net: stmmac: dwmac-tegra: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 22/23] net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove Jisheng Zhang
` (4 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Simplify the driver's probe() function by using the devres
variant of stmmac_probe_config_dt().
The calling of stmmac_pltfr_remove() now needs to be switched to
stmmac_pltfr_remove_no_dt().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-visconti.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
index 22d113fb8e09..45f5d66a11c2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
@@ -220,15 +220,13 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev)
if (ret)
return ret;
- plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
- if (!dwmac) {
- ret = -ENOMEM;
- goto remove_config;
- }
+ if (!dwmac)
+ return -ENOMEM;
spin_lock_init(&dwmac->lock);
dwmac->reg = stmmac_res.addr;
@@ -238,7 +236,7 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev)
ret = visconti_eth_clock_probe(pdev, plat_dat);
if (ret)
- goto remove_config;
+ return ret;
visconti_eth_init_hw(pdev, plat_dat);
@@ -252,22 +250,15 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev)
remove:
visconti_eth_clock_remove(pdev);
-remove_config:
- stmmac_remove_config_dt(pdev, plat_dat);
return ret;
}
static void visconti_eth_dwmac_remove(struct platform_device *pdev)
{
- struct net_device *ndev = platform_get_drvdata(pdev);
- struct stmmac_priv *priv = netdev_priv(ndev);
-
- stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove_no_dt(pdev);
visconti_eth_clock_remove(pdev);
-
- stmmac_remove_config_dt(pdev, priv->plat);
}
static const struct of_device_id visconti_eth_dwmac_match[] = {
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 22/23] net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (20 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 21/23] net: stmmac: dwmac-visconti: " Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 23/23] net: stmmac: make stmmac_{probe|remove}_config_dt static Jisheng Zhang
` (3 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Now, all users of the old stmmac_pltfr_remove() are converted to the
devres helper, it's time to rename stmmac_pltfr_remove_no_dt() back to
stmmac_pltfr_remove() and remove the old stmmac_pltfr_remove().
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +-
.../net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-ingenic.c | 2 +-
.../stmicro/stmmac/dwmac-intel-plat.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-mediatek.c | 2 +-
.../net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-starfive.c | 2 +-
.../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
.../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +-
.../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 2 +-
.../ethernet/stmicro/stmmac/dwmac-visconti.c | 3 +--
.../ethernet/stmicro/stmmac/stmmac_platform.c | 23 +++----------------
.../ethernet/stmicro/stmmac/stmmac_platform.h | 1 -
17 files changed, 18 insertions(+), 37 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
index 0df3a2ad0986..643ee6d8d4dd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
@@ -135,7 +135,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match);
static struct platform_driver anarion_dwmac_driver = {
.probe = anarion_dwmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "anarion-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
index e5989424894b..8f730ada71f9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -418,7 +418,7 @@ MODULE_DEVICE_TABLE(of, imx_dwmac_match);
static struct platform_driver imx_dwmac_driver = {
.probe = imx_dwmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "imx-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
index 3f87053ffc07..19c93b998fb3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
@@ -370,7 +370,7 @@ MODULE_DEVICE_TABLE(of, ingenic_mac_of_matches);
static struct platform_driver ingenic_mac_driver = {
.probe = ingenic_mac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "ingenic-mac",
.pm = pm_ptr(&ingenic_mac_pm_ops),
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
index d1aec2ca2b42..70edc5232379 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
@@ -164,7 +164,7 @@ static void intel_eth_plat_remove(struct platform_device *pdev)
{
struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
- stmmac_pltfr_remove_no_dt(pdev);
+ stmmac_pltfr_remove(pdev);
clk_disable_unprepare(dwmac->tx_clk);
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
index a9916fd07616..281687d7083b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
@@ -487,7 +487,7 @@ MODULE_DEVICE_TABLE(of, ipq806x_gmac_dwmac_match);
static struct platform_driver ipq806x_gmac_dwmac_driver = {
.probe = ipq806x_gmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "ipq806x-gmac-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
index dad23b47f383..4c810d8f5bea 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
@@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_dwmac_match);
static struct platform_driver lpc18xx_dwmac_driver = {
.probe = lpc18xx_dwmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "lpc18xx-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index 11976a854240..2a9132d6d743 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -683,7 +683,7 @@ static void mediatek_dwmac_remove(struct platform_device *pdev)
{
struct mediatek_dwmac_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev);
- stmmac_pltfr_remove_no_dt(pdev);
+ stmmac_pltfr_remove(pdev);
mediatek_dwmac_clks_config(priv_plat, false);
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
index 3373d3ec2368..a16bfa9089ea 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
@@ -78,7 +78,7 @@ MODULE_DEVICE_TABLE(of, meson6_dwmac_match);
static struct platform_driver meson6_dwmac_driver = {
.probe = meson6_dwmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "meson6-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
index 37f249980929..b23944aa344e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
@@ -520,7 +520,7 @@ MODULE_DEVICE_TABLE(of, meson8b_dwmac_match);
static struct platform_driver meson8b_dwmac_driver = {
.probe = meson8b_dwmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "meson8b-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 03e7701d0186..ba2ce776bd4d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -500,7 +500,7 @@ static void socfpga_dwmac_remove(struct platform_device *pdev)
struct stmmac_priv *priv = netdev_priv(ndev);
struct phylink_pcs *pcs = priv->hw->lynx_pcs;
- stmmac_pltfr_remove_no_dt(pdev);
+ stmmac_pltfr_remove(pdev);
lynx_pcs_destroy(pcs);
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index e87b4d335c72..5d630affb4d1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -152,7 +152,7 @@ MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
static struct platform_driver starfive_dwmac_driver = {
.probe = starfive_dwmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "starfive-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 63a7e5e53d7b..1c702d0b2d29 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1312,7 +1312,7 @@ static void sun8i_dwmac_remove(struct platform_device *pdev)
clk_put(gmac->ephy_clk);
}
- stmmac_pltfr_remove_no_dt(pdev);
+ stmmac_pltfr_remove(pdev);
sun8i_dwmac_unset_syscon(gmac);
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
index b857235f5b1f..2653a9f0958c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
@@ -172,7 +172,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match);
static struct platform_driver sun7i_dwmac_driver = {
.probe = sun7i_gmac_probe,
- .remove_new = stmmac_pltfr_remove_no_dt,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "sun7i-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
index 7e512c0762ea..362f85136c3e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
@@ -358,7 +358,7 @@ static void tegra_mgbe_remove(struct platform_device *pdev)
clk_bulk_disable_unprepare(ARRAY_SIZE(mgbe_clks), mgbe->clks);
- stmmac_pltfr_remove_no_dt(pdev);
+ stmmac_pltfr_remove(pdev);
}
static const struct of_device_id tegra_mgbe_match[] = {
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
index 45f5d66a11c2..a5a5cfa989c6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
@@ -256,8 +256,7 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev)
static void visconti_eth_dwmac_remove(struct platform_device *pdev)
{
- stmmac_pltfr_remove_no_dt(pdev);
-
+ stmmac_pltfr_remove(pdev);
visconti_eth_clock_remove(pdev);
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 0f28795e581c..716434b58321 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -807,7 +807,7 @@ static void devm_stmmac_pltfr_remove(void *data)
{
struct platform_device *pdev = data;
- stmmac_pltfr_remove_no_dt(pdev);
+ stmmac_pltfr_remove(pdev);
}
/**
@@ -834,12 +834,12 @@ int devm_stmmac_pltfr_probe(struct platform_device *pdev,
EXPORT_SYMBOL_GPL(devm_stmmac_pltfr_probe);
/**
- * stmmac_pltfr_remove_no_dt
+ * stmmac_pltfr_remove
* @pdev: pointer to the platform device
* Description: This undoes the effects of stmmac_pltfr_probe() by removing the
* driver and calling the platform's exit() callback.
*/
-void stmmac_pltfr_remove_no_dt(struct platform_device *pdev)
+void stmmac_pltfr_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *priv = netdev_priv(ndev);
@@ -848,23 +848,6 @@ void stmmac_pltfr_remove_no_dt(struct platform_device *pdev)
stmmac_dvr_remove(&pdev->dev);
stmmac_pltfr_exit(pdev, plat);
}
-EXPORT_SYMBOL_GPL(stmmac_pltfr_remove_no_dt);
-
-/**
- * stmmac_pltfr_remove
- * @pdev: platform device pointer
- * Description: this function calls the main to free the net resources
- * and calls the platforms hook and release the resources (e.g. mem).
- */
-void stmmac_pltfr_remove(struct platform_device *pdev)
-{
- struct net_device *ndev = platform_get_drvdata(pdev);
- struct stmmac_priv *priv = netdev_priv(ndev);
- struct plat_stmmacenet_data *plat = priv->plat;
-
- stmmac_pltfr_remove_no_dt(pdev);
- stmmac_remove_config_dt(pdev, plat);
-}
EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
/**
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
index c5565b2a70ac..bb07a99e1248 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
@@ -32,7 +32,6 @@ int stmmac_pltfr_probe(struct platform_device *pdev,
int devm_stmmac_pltfr_probe(struct platform_device *pdev,
struct plat_stmmacenet_data *plat,
struct stmmac_resources *res);
-void stmmac_pltfr_remove_no_dt(struct platform_device *pdev);
void stmmac_pltfr_remove(struct platform_device *pdev);
extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH net-next v2 23/23] net: stmmac: make stmmac_{probe|remove}_config_dt static
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (21 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 22/23] net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove Jisheng Zhang
@ 2023-09-16 7:58 ` Jisheng Zhang
2023-09-17 22:25 ` [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Emil Renner Berthing
` (2 subsequent siblings)
25 siblings, 0 replies; 32+ messages in thread
From: Jisheng Zhang @ 2023-09-16 7:58 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Now there's no external users of these two functions, make them static
so that there aren't any new usages of stmmac_probe_config_dt().
To avoid forward declaration, move stmmac_remove_config_dt() location.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Suggested-by: Russell King <linux@armlinux.org.uk>
---
.../ethernet/stmicro/stmmac/stmmac_platform.c | 47 +++++++------------
.../ethernet/stmicro/stmmac/stmmac_platform.h | 4 --
2 files changed, 17 insertions(+), 34 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 716434b58321..2063de1683b2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -384,6 +384,22 @@ static int stmmac_of_get_mac_mode(struct device_node *np)
return -ENODEV;
}
+/**
+ * stmmac_remove_config_dt - undo the effects of stmmac_probe_config_dt()
+ * @pdev: platform_device structure
+ * @plat: driver data platform structure
+ *
+ * Release resources claimed by stmmac_probe_config_dt().
+ */
+static void stmmac_remove_config_dt(struct platform_device *pdev,
+ struct plat_stmmacenet_data *plat)
+{
+ clk_disable_unprepare(plat->stmmac_clk);
+ clk_disable_unprepare(plat->pclk);
+ of_node_put(plat->phy_node);
+ of_node_put(plat->mdio_node);
+}
+
/**
* stmmac_probe_config_dt - parse device-tree driver parameters
* @pdev: platform_device structure
@@ -392,7 +408,7 @@ static int stmmac_of_get_mac_mode(struct device_node *np)
* this function is to read the driver parameters from device-tree and
* set some private fields that will be used by the main at runtime.
*/
-struct plat_stmmacenet_data *
+static struct plat_stmmacenet_data *
stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
{
struct device_node *np = pdev->dev.of_node;
@@ -662,43 +678,14 @@ devm_stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
return plat;
}
-
-/**
- * stmmac_remove_config_dt - undo the effects of stmmac_probe_config_dt()
- * @pdev: platform_device structure
- * @plat: driver data platform structure
- *
- * Release resources claimed by stmmac_probe_config_dt().
- */
-void stmmac_remove_config_dt(struct platform_device *pdev,
- struct plat_stmmacenet_data *plat)
-{
- clk_disable_unprepare(plat->stmmac_clk);
- clk_disable_unprepare(plat->pclk);
- of_node_put(plat->phy_node);
- of_node_put(plat->mdio_node);
-}
#else
-struct plat_stmmacenet_data *
-stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
-{
- return ERR_PTR(-EINVAL);
-}
-
struct plat_stmmacenet_data *
devm_stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
{
return ERR_PTR(-EINVAL);
}
-
-void stmmac_remove_config_dt(struct platform_device *pdev,
- struct plat_stmmacenet_data *plat)
-{
-}
#endif /* CONFIG_OF */
-EXPORT_SYMBOL_GPL(stmmac_probe_config_dt);
EXPORT_SYMBOL_GPL(devm_stmmac_probe_config_dt);
-EXPORT_SYMBOL_GPL(stmmac_remove_config_dt);
int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
index bb07a99e1248..bb6fc7e59aed 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
@@ -11,12 +11,8 @@
#include "stmmac.h"
-struct plat_stmmacenet_data *
-stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac);
struct plat_stmmacenet_data *
devm_stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac);
-void stmmac_remove_config_dt(struct platform_device *pdev,
- struct plat_stmmacenet_data *plat);
int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res);
--
2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 18/23] net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 ` [PATCH net-next v2 18/23] net: stmmac: dwmac-sun8i: " Jisheng Zhang
@ 2023-09-17 14:42 ` Jernej Škrabec
0 siblings, 0 replies; 32+ messages in thread
From: Jernej Škrabec @ 2023-09-17 14:42 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Samuel Holland,
Thierry Reding, Nobuhiro Iwamatsu, Russell King, Matthias Brugger,
AngeloGioacchino Del Regno, Jisheng Zhang
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Dne sobota, 16. september 2023 ob 09:58:24 CEST je Jisheng Zhang napisal(a):
> Simplify the driver's probe() function by using the devres
> variant of stmmac_probe_config_dt().
>
> The calling of stmmac_pltfr_remove() now needs to be switched to
> stmmac_pltfr_remove_no_dt().
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index
> 01e77368eef1..63a7e5e53d7b 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> @@ -1224,7 +1224,7 @@ static int sun8i_dwmac_probe(struct platform_device
> *pdev) if (ret)
> return -EINVAL;
>
> - plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
> + plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
> if (IS_ERR(plat_dat))
> return PTR_ERR(plat_dat);
>
> @@ -1244,7 +1244,7 @@ static int sun8i_dwmac_probe(struct platform_device
> *pdev)
>
> ret = sun8i_dwmac_set_syscon(&pdev->dev, plat_dat);
> if (ret)
> - goto dwmac_deconfig;
> + return ret;
>
> ret = sun8i_dwmac_init(pdev, plat_dat->bsp_priv);
> if (ret)
> @@ -1295,8 +1295,6 @@ static int sun8i_dwmac_probe(struct platform_device
> *pdev) sun8i_dwmac_exit(pdev, gmac);
> dwmac_syscon:
> sun8i_dwmac_unset_syscon(gmac);
> -dwmac_deconfig:
> - stmmac_remove_config_dt(pdev, plat_dat);
>
> return ret;
> }
> @@ -1314,7 +1312,7 @@ static void sun8i_dwmac_remove(struct platform_device
> *pdev) clk_put(gmac->ephy_clk);
> }
>
> - stmmac_pltfr_remove(pdev);
> + stmmac_pltfr_remove_no_dt(pdev);
> sun8i_dwmac_unset_syscon(gmac);
> }
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 19/23] net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 ` [PATCH net-next v2 19/23] net: stmmac: dwmac-sunxi: " Jisheng Zhang
@ 2023-09-17 14:43 ` Jernej Škrabec
0 siblings, 0 replies; 32+ messages in thread
From: Jernej Škrabec @ 2023-09-17 14:43 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Samuel Holland,
Thierry Reding, Nobuhiro Iwamatsu, Russell King, Matthias Brugger,
AngeloGioacchino Del Regno, Jisheng Zhang
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Dne sobota, 16. september 2023 ob 09:58:25 CEST je Jisheng Zhang napisal(a):
> Simplify the driver's probe() function by using the devres
> variant of stmmac_probe_config_dt().
>
> The remove_new() callback now needs to be switched to
> stmmac_pltfr_remove_no_dt().
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 25 +++++++------------
> 1 file changed, 9 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
> b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c index
> beceeae579bf..b857235f5b1f 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
> @@ -108,36 +108,31 @@ static int sun7i_gmac_probe(struct platform_device
> *pdev) if (ret)
> return ret;
>
> - plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
> + plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
> if (IS_ERR(plat_dat))
> return PTR_ERR(plat_dat);
>
> gmac = devm_kzalloc(dev, sizeof(*gmac), GFP_KERNEL);
> - if (!gmac) {
> - ret = -ENOMEM;
> - goto err_remove_config_dt;
> - }
> + if (!gmac)
> + return -ENOMEM;
>
> ret = of_get_phy_mode(dev->of_node, &gmac->interface);
> if (ret && ret != -ENODEV) {
> dev_err(dev, "Can't get phy-mode\n");
> - goto err_remove_config_dt;
> + return ret;
> }
>
> gmac->tx_clk = devm_clk_get(dev, "allwinner_gmac_tx");
> if (IS_ERR(gmac->tx_clk)) {
> dev_err(dev, "could not get tx clock\n");
> - ret = PTR_ERR(gmac->tx_clk);
> - goto err_remove_config_dt;
> + return PTR_ERR(gmac->tx_clk);
> }
>
> /* Optional regulator for PHY */
> gmac->regulator = devm_regulator_get_optional(dev, "phy");
> if (IS_ERR(gmac->regulator)) {
> - if (PTR_ERR(gmac->regulator) == -EPROBE_DEFER) {
> - ret = -EPROBE_DEFER;
> - goto err_remove_config_dt;
> - }
> + if (PTR_ERR(gmac->regulator) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
> dev_info(dev, "no regulator found\n");
> gmac->regulator = NULL;
> }
> @@ -155,7 +150,7 @@ static int sun7i_gmac_probe(struct platform_device
> *pdev)
>
> ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv);
> if (ret)
> - goto err_remove_config_dt;
> + return ret;
>
> ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
> if (ret)
> @@ -165,8 +160,6 @@ static int sun7i_gmac_probe(struct platform_device
> *pdev)
>
> err_gmac_exit:
> sun7i_gmac_exit(pdev, plat_dat->bsp_priv);
> -err_remove_config_dt:
> - stmmac_remove_config_dt(pdev, plat_dat);
>
> return ret;
> }
> @@ -179,7 +172,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match);
>
> static struct platform_driver sun7i_dwmac_driver = {
> .probe = sun7i_gmac_probe,
> - .remove_new = stmmac_pltfr_remove,
> + .remove_new = stmmac_pltfr_remove_no_dt,
> .driver = {
> .name = "sun7i-dwmac",
> .pm = &stmmac_pltfr_pm_ops,
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (22 preceding siblings ...)
2023-09-16 7:58 ` [PATCH net-next v2 23/23] net: stmmac: make stmmac_{probe|remove}_config_dt static Jisheng Zhang
@ 2023-09-17 22:25 ` Emil Renner Berthing
2023-09-18 11:50 ` patchwork-bot+netdevbpf
2023-09-18 20:14 ` Serge Semin
25 siblings, 0 replies; 32+ messages in thread
From: Emil Renner Berthing @ 2023-09-17 22:25 UTC (permalink / raw)
To: Jisheng Zhang, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: netdev, linux-stm32, linux-arm-kernel, linux-amlogic, linux-sunxi,
linux-tegra, linux-mediatek
Jisheng Zhang wrote:
> Russell pointed out there's a new devm_stmmac_probe_config_dt()
> helper now when reviewing my starfive gmac error handling patch[1].
> After greping the code, this nice helper was introduced by Bartosz in
> [2], I think it's time to convert all dwmac users to this helper and
> finally complete the TODO in [2] "but once all users of the old
> stmmac_pltfr_remove() are converted to the devres helper, it will be
> renamed back to stmmac_pltfr_remove() and the no_dt function removed."
Thanks for doing this.
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
>
> Link: https://lore.kernel.org/netdev/ZOtWmedBsa6wQQ6+@shell.armlinux.org.uk/ [1]
> Link: https://lore.kernel.org/all/20230623100417.93592-1-brgl@bgdev.pl/ [2]
>
> Since v1:
> - rebase on new net-next
> - add make stmmac_{probe|remove}_config_dt static as suggested by Russell.
>
> Jisheng Zhang (23):
> net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-generic: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe()
> net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-ingenic: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-ipq806x: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-lpc18xx: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-mediatek: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-meson: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-meson8b: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-rk: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-socfpga: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-starfive: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-sti: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-stm32: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-tegra: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-visconti: use devm_stmmac_probe_config_dt()
> net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove
> net: stmmac: make stmmac_{probe|remove}_config_dt static
>
> .../ethernet/stmicro/stmmac/dwmac-anarion.c | 10 +--
> .../stmicro/stmmac/dwmac-dwc-qos-eth.c | 15 +---
> .../ethernet/stmicro/stmmac/dwmac-generic.c | 15 +---
> .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 13 ++--
> .../ethernet/stmicro/stmmac/dwmac-ingenic.c | 33 +++------
> .../stmicro/stmmac/dwmac-intel-plat.c | 25 +++----
> .../ethernet/stmicro/stmmac/dwmac-ipq806x.c | 27 +++----
> .../ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 19 ++---
> .../ethernet/stmicro/stmmac/dwmac-mediatek.c | 6 +-
> .../net/ethernet/stmicro/stmmac/dwmac-meson.c | 25 ++-----
> .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 53 +++++---------
> .../net/ethernet/stmicro/stmmac/dwmac-rk.c | 14 ++--
> .../ethernet/stmicro/stmmac/dwmac-socfpga.c | 16 ++---
> .../ethernet/stmicro/stmmac/dwmac-starfive.c | 10 +--
> .../net/ethernet/stmicro/stmmac/dwmac-sti.c | 14 ++--
> .../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 17 ++---
> .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 +-
> .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 23 +++---
> .../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 10 ++-
> .../ethernet/stmicro/stmmac/dwmac-visconti.c | 18 ++---
> .../ethernet/stmicro/stmmac/stmmac_platform.c | 70 ++++++-------------
> .../ethernet/stmicro/stmmac/stmmac_platform.h | 5 --
> 22 files changed, 127 insertions(+), 317 deletions(-)
>
> --
> 2.40.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (23 preceding siblings ...)
2023-09-17 22:25 ` [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Emil Renner Berthing
@ 2023-09-18 11:50 ` patchwork-bot+netdevbpf
2023-09-18 20:14 ` Serge Semin
25 siblings, 0 replies; 32+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-09-18 11:50 UTC (permalink / raw)
To: Jisheng Zhang
Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, edumazet, kuba,
pabeni, mcoquelin.stm32, shawnguo, s.hauer, kernel, festevam,
linux-imx, vz, neil.armstrong, khilman, jbrunet,
martin.blumenstingl, kernel, samin.guo, wens, jernej.skrabec,
samuel, thierry.reding, nobuhiro1.iwamatsu, linux, matthias.bgg,
angelogioacchino.delregno, netdev, linux-stm32, linux-arm-kernel,
linux-amlogic, linux-sunxi, linux-tegra, linux-mediatek
Hello:
This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Sat, 16 Sep 2023 15:58:06 +0800 you wrote:
> Russell pointed out there's a new devm_stmmac_probe_config_dt()
> helper now when reviewing my starfive gmac error handling patch[1].
> After greping the code, this nice helper was introduced by Bartosz in
> [2], I think it's time to convert all dwmac users to this helper and
> finally complete the TODO in [2] "but once all users of the old
> stmmac_pltfr_remove() are converted to the devres helper, it will be
> renamed back to stmmac_pltfr_remove() and the no_dt function removed."
>
> [...]
Here is the summary with links:
- [net-next,v2,01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/6f799fd9dda7
- [net-next,v2,02/23] net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/0485825dd6a8
- [net-next,v2,03/23] net: stmmac: dwmac-generic: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/d53b19d2a1a8
- [net-next,v2,04/23] net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe()
https://git.kernel.org/netdev/net-next/c/14ec0fc582c5
- [net-next,v2,05/23] net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/115c9248b19b
- [net-next,v2,06/23] net: stmmac: dwmac-ingenic: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/6bb53b2abf30
- [net-next,v2,07/23] net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/abea8fd5e801
- [net-next,v2,08/23] net: stmmac: dwmac-ipq806x: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/72ab86c27d4e
- [net-next,v2,09/23] net: stmmac: dwmac-lpc18xx: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/d30c08a3b001
- [net-next,v2,10/23] net: stmmac: dwmac-mediatek: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/d7209c056a49
- [net-next,v2,11/23] net: stmmac: dwmac-meson: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/780b63ae208e
- [net-next,v2,12/23] net: stmmac: dwmac-meson8b: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/551022d680ec
- [net-next,v2,13/23] net: stmmac: dwmac-rk: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/8eee20e10d6f
- [net-next,v2,14/23] net: stmmac: dwmac-socfpga: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/9086d3f2b560
- [net-next,v2,15/23] net: stmmac: dwmac-starfive: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/6d6c11937359
- [net-next,v2,16/23] net: stmmac: dwmac-sti: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/c9445e0bd729
- [net-next,v2,17/23] net: stmmac: dwmac-stm32: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/373845154618
- [net-next,v2,18/23] net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/9bdf6909877c
- [net-next,v2,19/23] net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/291595337626
- [net-next,v2,20/23] net: stmmac: dwmac-tegra: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/acf73ccff08e
- [net-next,v2,21/23] net: stmmac: dwmac-visconti: use devm_stmmac_probe_config_dt()
https://git.kernel.org/netdev/net-next/c/d336a117b593
- [net-next,v2,22/23] net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove
https://git.kernel.org/netdev/net-next/c/2c9fc838067b
- [net-next,v2,23/23] net: stmmac: make stmmac_{probe|remove}_config_dt static
https://git.kernel.org/netdev/net-next/c/b2504f649bda
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 02/23] net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 ` [PATCH net-next v2 02/23] net: stmmac: dwmac-dwc-qos-eth: " Jisheng Zhang
@ 2023-09-18 19:11 ` Serge Semin
0 siblings, 0 replies; 32+ messages in thread
From: Serge Semin @ 2023-09-18 19:11 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, linux-amlogic, linux-sunxi, linux-tegra,
linux-mediatek
Hi Jisheng
On Sat, Sep 16, 2023 at 03:58:08PM +0800, Jisheng Zhang wrote:
> Simplify the driver's probe() function by using the devres
> variant of stmmac_probe_config_dt().
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> index 61ebf36da13d..ec924c6c76c6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> @@ -435,15 +435,14 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)
> if (IS_ERR(stmmac_res.addr))
> return PTR_ERR(stmmac_res.addr);
>
> - plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
> + plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
> if (IS_ERR(plat_dat))
> return PTR_ERR(plat_dat);
>
> ret = data->probe(pdev, plat_dat, &stmmac_res);
> if (ret < 0) {
> dev_err_probe(&pdev->dev, ret, "failed to probe subdriver\n");
> -
> - goto remove_config;
> + return ret;
just "return dev_err_probe()".
-Serge(y)
> }
>
> ret = dwc_eth_dwmac_config_dt(pdev, plat_dat);
> @@ -458,25 +457,17 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)
>
> remove:
> data->remove(pdev);
> -remove_config:
> - stmmac_remove_config_dt(pdev, plat_dat);
>
> return ret;
> }
>
> static void dwc_eth_dwmac_remove(struct platform_device *pdev)
> {
> - struct net_device *ndev = platform_get_drvdata(pdev);
> - struct stmmac_priv *priv = netdev_priv(ndev);
> - const struct dwc_eth_dwmac_data *data;
> -
> - data = device_get_match_data(&pdev->dev);
> + const struct dwc_eth_dwmac_data *data = device_get_match_data(&pdev->dev);
>
> stmmac_dvr_remove(&pdev->dev);
>
> data->remove(pdev);
> -
> - stmmac_remove_config_dt(pdev, priv->plat);
> }
>
> static const struct of_device_id dwc_eth_dwmac_match[] = {
> --
> 2.40.1
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 ` [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt() Jisheng Zhang
@ 2023-09-18 19:27 ` Serge Semin
0 siblings, 0 replies; 32+ messages in thread
From: Serge Semin @ 2023-09-18 19:27 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, linux-amlogic, linux-sunxi, linux-tegra,
linux-mediatek
On Sat, Sep 16, 2023 at 03:58:07PM +0800, Jisheng Zhang wrote:
> Simplify the driver's probe() function by using the devres
> variant of stmmac_probe_config_dt().
>
> The remove_new() callback now needs to be switched to
> stmmac_pltfr_remove_no_dt().
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
> index 58a7f08e8d78..0df3a2ad0986 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
> @@ -115,7 +115,7 @@ static int anarion_dwmac_probe(struct platform_device *pdev)
> if (IS_ERR(gmac))
> return PTR_ERR(gmac);
>
> - plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
> + plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
> if (IS_ERR(plat_dat))
> return PTR_ERR(plat_dat);
>
> @@ -124,13 +124,7 @@ static int anarion_dwmac_probe(struct platform_device *pdev)
> anarion_gmac_init(pdev, gmac);
> plat_dat->bsp_priv = gmac;
>
> - ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
> - if (ret) {
> - stmmac_remove_config_dt(pdev, plat_dat);
> - return ret;
> - }
> -
> - return 0;
> + return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
Just a general note, IMO it's better from maintainability point of
view to use the pattern:
ret = func();
if (ret)
return ret;
return 0;
Thus should you need to add any functions call after or before the
func() method invocation with possible clean-up-on-error code the
change patch will look a bit simpler and more readable.
-Serge(y)
> }
>
> static const struct of_device_id anarion_dwmac_match[] = {
> @@ -141,7 +135,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match);
>
> static struct platform_driver anarion_dwmac_driver = {
> .probe = anarion_dwmac_probe,
> - .remove_new = stmmac_pltfr_remove,
> + .remove_new = stmmac_pltfr_remove_no_dt,
> .driver = {
> .name = "anarion-dwmac",
> .pm = &stmmac_pltfr_pm_ops,
> --
> 2.40.1
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 07/23] net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
2023-09-16 7:58 ` [PATCH net-next v2 07/23] net: stmmac: dwmac-intel-plat: " Jisheng Zhang
@ 2023-09-18 19:47 ` Serge Semin
0 siblings, 0 replies; 32+ messages in thread
From: Serge Semin @ 2023-09-18 19:47 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, linux-amlogic, linux-sunxi, linux-tegra,
linux-mediatek
On Sat, Sep 16, 2023 at 03:58:13PM +0800, Jisheng Zhang wrote:
> Simplify the driver's probe() function by using the devres
> variant of stmmac_probe_config_dt().
>
> The calling of stmmac_pltfr_remove() now needs to be switched to
> stmmac_pltfr_remove_no_dt().
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> .../stmicro/stmmac/dwmac-intel-plat.c | 27 +++++++------------
> 1 file changed, 9 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
> index d352a14f9d48..d1aec2ca2b42 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
> @@ -85,17 +85,15 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - plat_dat = stmmac_probe_config_dt(pdev, stmmac_res.mac);
> + plat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
> if (IS_ERR(plat_dat)) {
> dev_err(&pdev->dev, "dt configuration failed\n");
> return PTR_ERR(plat_dat);
> }
>
> dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
> - if (!dwmac) {
> - ret = -ENOMEM;
> - goto err_remove_config_dt;
> - }
> + if (!dwmac)
> + return -ENOMEM;
>
> dwmac->dev = &pdev->dev;
> dwmac->tx_clk = NULL;
> @@ -110,10 +108,8 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
> /* Enable TX clock */
> if (dwmac->data->tx_clk_en) {
> dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk");
> - if (IS_ERR(dwmac->tx_clk)) {
> - ret = PTR_ERR(dwmac->tx_clk);
> - goto err_remove_config_dt;
> - }
> + if (IS_ERR(dwmac->tx_clk))
> + return PTR_ERR(dwmac->tx_clk);
>
> clk_prepare_enable(dwmac->tx_clk);
>
> @@ -126,7 +122,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
> if (ret) {
> dev_err(&pdev->dev,
> "Failed to set tx_clk\n");
> - goto err_remove_config_dt;
> + return ret;
> }
> }
> }
> @@ -140,7 +136,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
> if (ret) {
> dev_err(&pdev->dev,
> "Failed to set clk_ptp_ref\n");
> - goto err_remove_config_dt;
> + return ret;
> }
> }
> }
> @@ -158,22 +154,17 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
> ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
> if (ret) {
> clk_disable_unprepare(dwmac->tx_clk);
> - goto err_remove_config_dt;
> + return ret;
Just a general note IMO it's better for maintainability to have the
clean-up-on-error block than reverting the previous changes in the if
body. Thus should you add new functions call before the block in
subject you won't need to add duplicated cleanup functions calls, but
just add new reverting method invocation to the cleanup-on-error path.
-Serge(y)
> }
>
> return 0;
> -
> -err_remove_config_dt:
> - stmmac_remove_config_dt(pdev, plat_dat);
> -
> - return ret;
> }
>
> static void intel_eth_plat_remove(struct platform_device *pdev)
> {
> struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
>
> - stmmac_pltfr_remove(pdev);
> + stmmac_pltfr_remove_no_dt(pdev);
> clk_disable_unprepare(dwmac->tx_clk);
> }
>
> --
> 2.40.1
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
` (24 preceding siblings ...)
2023-09-18 11:50 ` patchwork-bot+netdevbpf
@ 2023-09-18 20:14 ` Serge Semin
25 siblings, 0 replies; 32+ messages in thread
From: Serge Semin @ 2023-09-18 20:14 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Emil Renner Berthing, Samin Guo, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Thierry Reding, Nobuhiro Iwamatsu, Russell King,
Matthias Brugger, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, linux-amlogic, linux-sunxi, linux-tegra,
linux-mediatek
On Sat, Sep 16, 2023 at 03:58:06PM +0800, Jisheng Zhang wrote:
> Russell pointed out there's a new devm_stmmac_probe_config_dt()
> helper now when reviewing my starfive gmac error handling patch[1].
> After greping the code, this nice helper was introduced by Bartosz in
> [2], I think it's time to convert all dwmac users to this helper and
> finally complete the TODO in [2] "but once all users of the old
> stmmac_pltfr_remove() are converted to the devres helper, it will be
> renamed back to stmmac_pltfr_remove() and the no_dt function removed."
>
> Link: https://lore.kernel.org/netdev/ZOtWmedBsa6wQQ6+@shell.armlinux.org.uk/ [1]
> Link: https://lore.kernel.org/all/20230623100417.93592-1-brgl@bgdev.pl/ [2]
I see the series is already merged in. In anyway here is my tag:
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Thanks for submitting the set.
-Serge(y)
>
> Since v1:
> - rebase on new net-next
> - add make stmmac_{probe|remove}_config_dt static as suggested by Russell.
>
> Jisheng Zhang (23):
> net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-generic: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe()
> net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-ingenic: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-ipq806x: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-lpc18xx: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-mediatek: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-meson: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-meson8b: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-rk: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-socfpga: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-starfive: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-sti: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-stm32: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-tegra: use devm_stmmac_probe_config_dt()
> net: stmmac: dwmac-visconti: use devm_stmmac_probe_config_dt()
> net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove
> net: stmmac: make stmmac_{probe|remove}_config_dt static
>
> .../ethernet/stmicro/stmmac/dwmac-anarion.c | 10 +--
> .../stmicro/stmmac/dwmac-dwc-qos-eth.c | 15 +---
> .../ethernet/stmicro/stmmac/dwmac-generic.c | 15 +---
> .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 13 ++--
> .../ethernet/stmicro/stmmac/dwmac-ingenic.c | 33 +++------
> .../stmicro/stmmac/dwmac-intel-plat.c | 25 +++----
> .../ethernet/stmicro/stmmac/dwmac-ipq806x.c | 27 +++----
> .../ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 19 ++---
> .../ethernet/stmicro/stmmac/dwmac-mediatek.c | 6 +-
> .../net/ethernet/stmicro/stmmac/dwmac-meson.c | 25 ++-----
> .../ethernet/stmicro/stmmac/dwmac-meson8b.c | 53 +++++---------
> .../net/ethernet/stmicro/stmmac/dwmac-rk.c | 14 ++--
> .../ethernet/stmicro/stmmac/dwmac-socfpga.c | 16 ++---
> .../ethernet/stmicro/stmmac/dwmac-starfive.c | 10 +--
> .../net/ethernet/stmicro/stmmac/dwmac-sti.c | 14 ++--
> .../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 17 ++---
> .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 +-
> .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 23 +++---
> .../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 10 ++-
> .../ethernet/stmicro/stmmac/dwmac-visconti.c | 18 ++---
> .../ethernet/stmicro/stmmac/stmmac_platform.c | 70 ++++++-------------
> .../ethernet/stmicro/stmmac/stmmac_platform.h | 5 --
> 22 files changed, 127 insertions(+), 317 deletions(-)
>
> --
> 2.40.1
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2023-09-18 20:14 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-16 7:58 [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 01/23] net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt() Jisheng Zhang
2023-09-18 19:27 ` Serge Semin
2023-09-16 7:58 ` [PATCH net-next v2 02/23] net: stmmac: dwmac-dwc-qos-eth: " Jisheng Zhang
2023-09-18 19:11 ` Serge Semin
2023-09-16 7:58 ` [PATCH net-next v2 03/23] net: stmmac: dwmac-generic: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 04/23] net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe() Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 05/23] net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt() Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 06/23] net: stmmac: dwmac-ingenic: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 07/23] net: stmmac: dwmac-intel-plat: " Jisheng Zhang
2023-09-18 19:47 ` Serge Semin
2023-09-16 7:58 ` [PATCH net-next v2 08/23] net: stmmac: dwmac-ipq806x: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 09/23] net: stmmac: dwmac-lpc18xx: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 10/23] net: stmmac: dwmac-mediatek: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 11/23] net: stmmac: dwmac-meson: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 12/23] net: stmmac: dwmac-meson8b: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 13/23] net: stmmac: dwmac-rk: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 14/23] net: stmmac: dwmac-socfpga: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 15/23] net: stmmac: dwmac-starfive: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 16/23] net: stmmac: dwmac-sti: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 17/23] net: stmmac: dwmac-stm32: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 18/23] net: stmmac: dwmac-sun8i: " Jisheng Zhang
2023-09-17 14:42 ` Jernej Škrabec
2023-09-16 7:58 ` [PATCH net-next v2 19/23] net: stmmac: dwmac-sunxi: " Jisheng Zhang
2023-09-17 14:43 ` Jernej Škrabec
2023-09-16 7:58 ` [PATCH net-next v2 20/23] net: stmmac: dwmac-tegra: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 21/23] net: stmmac: dwmac-visconti: " Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 22/23] net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove Jisheng Zhang
2023-09-16 7:58 ` [PATCH net-next v2 23/23] net: stmmac: make stmmac_{probe|remove}_config_dt static Jisheng Zhang
2023-09-17 22:25 ` [PATCH net-next v2 00/22] convert to devm_stmmac_probe_config_dt Emil Renner Berthing
2023-09-18 11:50 ` patchwork-bot+netdevbpf
2023-09-18 20:14 ` Serge Semin
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).