* [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:47 ` Peppe CAVALLARO
2023-05-08 19:38 ` Martin Blumenstingl
2023-05-08 14:26 ` [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() " Uwe Kleine-König
` (11 subsequent siblings)
12 siblings, 2 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 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, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Vinod Koul, Emil Renner Berthing, Samin Guo,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Nobuhiro Iwamatsu,
Matthias Brugger
Cc: Fabio Estevam, NXP Linux Team, Jerome Brunet, Martin Blumenstingl,
Bhupesh Sharma, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, kernel, linux-amlogic, linux-oxnas, linux-sunxi,
linux-mediatek, Simon Horman
The function returns zero unconditionally. Change it to return void instead
which simplifies some callers as error handing becomes unnecessary.
The function is also used for some drivers as remove callback. Switch these
to the .remove_new() callback. For some others no error can happen in the
remove callback now, convert them to .remove_new(), too.
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 9 +++------
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 9 +++------
drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 5 ++---
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 4 +---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 +---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h | 2 +-
18 files changed, 23 insertions(+), 34 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
index 9354bf419112..58a7f08e8d78 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
@@ -141,7 +141,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match);
static struct platform_driver anarion_dwmac_driver = {
.probe = anarion_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "anarion-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index ef8f3a940938..ef1023930fd0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -87,7 +87,7 @@ MODULE_DEVICE_TABLE(of, dwmac_generic_match);
static struct platform_driver dwmac_generic_driver = {
.probe = dwmac_generic_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = STMMAC_RESOURCE_NAME,
.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 7c228bd0d099..b9378a63f0e8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -376,7 +376,7 @@ MODULE_DEVICE_TABLE(of, imx_dwmac_match);
static struct platform_driver imx_dwmac_driver = {
.probe = imx_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 378b4dd826bb..8063ba1c3ce8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
@@ -386,7 +386,7 @@ MODULE_DEVICE_TABLE(of, ingenic_mac_of_matches);
static struct platform_driver ingenic_mac_driver = {
.probe = ingenic_mac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 06d287f104be..a5e639ab0b9e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
@@ -169,20 +169,17 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
return ret;
}
-static int intel_eth_plat_remove(struct platform_device *pdev)
+static void intel_eth_plat_remove(struct platform_device *pdev)
{
struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
- int ret;
- ret = stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove(pdev);
clk_disable_unprepare(dwmac->tx_clk);
-
- return ret;
}
static struct platform_driver intel_eth_plat_driver = {
.probe = intel_eth_plat_probe,
- .remove = intel_eth_plat_remove,
+ .remove_new = intel_eth_plat_remove,
.driver = {
.name = "intel-eth-plat",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
index e888c8a9c830..e39406df8516 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
@@ -498,7 +498,7 @@ MODULE_DEVICE_TABLE(of, ipq806x_gmac_dwmac_match);
static struct platform_driver ipq806x_gmac_dwmac_driver = {
.probe = ipq806x_gmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 9d77c647badd..18e84ba693a6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
@@ -83,7 +83,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_dwmac_match);
static struct platform_driver lpc18xx_dwmac_driver = {
.probe = lpc18xx_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 9ae31e3dc821..73c1dfa7ecb1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -678,15 +678,12 @@ static int mediatek_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int mediatek_dwmac_remove(struct platform_device *pdev)
+static void mediatek_dwmac_remove(struct platform_device *pdev)
{
struct mediatek_dwmac_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev);
- int ret;
- ret = stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove(pdev);
mediatek_dwmac_clks_config(priv_plat, false);
-
- return ret;
}
static const struct of_device_id mediatek_dwmac_match[] = {
@@ -701,7 +698,7 @@ MODULE_DEVICE_TABLE(of, mediatek_dwmac_match);
static struct platform_driver mediatek_dwmac_driver = {
.probe = mediatek_dwmac_probe,
- .remove = mediatek_dwmac_remove,
+ .remove_new = mediatek_dwmac_remove,
.driver = {
.name = "dwmac-mediatek",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
index 16fb66a0ca72..7aa5e6bc04eb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
@@ -91,7 +91,7 @@ MODULE_DEVICE_TABLE(of, meson6_dwmac_match);
static struct platform_driver meson6_dwmac_driver = {
.probe = meson6_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 f6754e3643f3..92b16048f91c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
@@ -539,7 +539,7 @@ MODULE_DEVICE_TABLE(of, meson8b_dwmac_match);
static struct platform_driver meson8b_dwmac_driver = {
.probe = meson8b_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "meson8b-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
index 62a69a91ab22..42954020de2c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
@@ -231,7 +231,7 @@ MODULE_DEVICE_TABLE(of, oxnas_dwmac_match);
static struct platform_driver oxnas_dwmac_driver = {
.probe = oxnas_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "oxnas-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 16a8c361283b..494c22243259 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -668,16 +668,15 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
static int qcom_ethqos_remove(struct platform_device *pdev)
{
struct qcom_ethqos *ethqos;
- int ret;
ethqos = get_stmmac_bsp_priv(&pdev->dev);
if (!ethqos)
return -ENODEV;
- ret = stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove(pdev);
ethqos_clks_config(ethqos, false);
- return ret;
+ return 0;
}
static const struct of_device_id qcom_ethqos_match[] = {
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 6b447d8f0bd8..6ee050300b31 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -524,7 +524,7 @@ MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
static struct platform_driver socfpga_dwmac_driver = {
.probe = socfpga_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "socfpga-dwmac",
.pm = &socfpga_dwmac_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index 4f51a7889642..d3a39d2fb3a9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -156,7 +156,7 @@ MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
static struct platform_driver starfive_dwmac_driver = {
.probe = starfive_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "starfive-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
index fc3b0acc8f99..50963e91c347 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
@@ -179,7 +179,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match);
static struct platform_driver sun7i_dwmac_driver = {
.probe = sun7i_gmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "sun7i-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
index c3f10a92b62b..d43da71eb1e1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
@@ -265,9 +265,7 @@ static int visconti_eth_dwmac_remove(struct platform_device *pdev)
struct stmmac_priv *priv = netdev_priv(ndev);
int err;
- err = stmmac_pltfr_remove(pdev);
- if (err < 0)
- dev_err(&pdev->dev, "failed to remove platform: %d\n", err);
+ stmmac_pltfr_remove(pdev);
err = visconti_eth_clock_remove(pdev);
if (err < 0)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index eb0b2898daa3..3c6b55b60461 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -707,7 +707,7 @@ EXPORT_SYMBOL_GPL(stmmac_get_platform_resources);
* Description: this function calls the main to free the net resources
* and calls the platforms hook and release the resources (e.g. mem).
*/
-int stmmac_pltfr_remove(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);
@@ -719,8 +719,6 @@ int stmmac_pltfr_remove(struct platform_device *pdev)
plat->exit(pdev, plat->bsp_priv);
stmmac_remove_config_dt(pdev, plat);
-
- return 0;
}
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 3fff3f59d73d..f7e457946681 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
@@ -19,7 +19,7 @@ void stmmac_remove_config_dt(struct platform_device *pdev,
int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res);
-int stmmac_pltfr_remove(struct platform_device *pdev);
+void stmmac_pltfr_remove(struct platform_device *pdev);
extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
static inline void *get_stmmac_bsp_priv(struct device *dev)
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* RE: [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void
2023-05-08 14:26 ` [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void Uwe Kleine-König
@ 2023-05-08 14:47 ` Peppe CAVALLARO
2023-05-08 17:19 ` Uwe Kleine-König
2023-05-08 19:38 ` Martin Blumenstingl
1 sibling, 1 reply; 23+ messages in thread
From: Peppe CAVALLARO @ 2023-05-08 14:47 UTC (permalink / raw)
To: Uwe Kleine-König, Alexandre TORGUE - foss, Jose Abreu,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Shawn Guo, Sascha Hauer, Vladimir Zapolskiy,
Neil Armstrong, Kevin Hilman, Vinod Koul, Emil Renner Berthing,
Samin Guo, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
Nobuhiro Iwamatsu, Matthias Brugger
Cc: Fabio Estevam, NXP Linux Team, Jerome Brunet, Martin Blumenstingl,
Bhupesh Sharma, AngeloGioacchino Del Regno,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de,
linux-amlogic@lists.infradead.org, linux-oxnas@groups.io,
linux-sunxi@lists.linux.dev, linux-mediatek@lists.infradead.org,
Simon Horman
Hello
Thx for this patch train, maybe I missed the cover letter. In my opinion the proposed change is intrusive but I can accept. It could be great to enhance the platform remove functions to fail in case of an expected case occurs.
+ .remove_new = stmmac_pltfr_remove,
To be honest, I do not like to see: ".remove_new" as hook
Regards
peppe
ST Restricted
-----Original Message-----
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sent: Monday, May 8, 2023 4:26 PM
To: Peppe CAVALLARO <peppe.cavallaro@st.com>; Alexandre TORGUE - foss <alexandre.torgue@foss.st.com>; Jose Abreu <joabreu@synopsys.com>; David S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Maxime Coquelin <mcoquelin.stm32@gmail.com>; Shawn Guo <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>; Vladimir Zapolskiy <vz@mleia.com>; Neil Armstrong <neil.armstrong@linaro.org>; Kevin Hilman <khilman@baylibre.com>; Vinod Koul <vkoul@kernel.org>; Emil Renner Berthing <kernel@esmil.dk>; Samin Guo <samin.guo@starfivetech.com>; Chen-Yu Tsai <wens@csie.org>; Jernej Skrabec <jernej.skrabec@gmail.com>; Samuel Holland <samuel@sholland.org>; Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>; Matthias Brugger <matthias.bgg@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>; NXP Linux Team <linux-imx@nxp.com>; Jerome Brunet <jbrunet@baylibre.com>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; Bhupesh Sharma <bhupesh.sharma@linaro.org>; AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; netdev@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com; linux-arm-kernel@lists.infradead.org; kernel@pengutronix.de; linux-amlogic@lists.infradead.org; linux-oxnas@groups.io; linux-sunxi@lists.linux.dev; linux-mediatek@lists.infradead.org; Simon Horman <simon.horman@corigine.com>
Subject: [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void
The function returns zero unconditionally. Change it to return void instead which simplifies some callers as error handing becomes unnecessary.
The function is also used for some drivers as remove callback. Switch these to the .remove_new() callback. For some others no error can happen in the remove callback now, convert them to .remove_new(), too.
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 9 +++------
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 9 +++------
drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 5 ++---
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 4 +---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 +---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h | 2 +-
18 files changed, 23 insertions(+), 34 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
index 9354bf419112..58a7f08e8d78 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c
@@ -141,7 +141,7 @@ MODULE_DEVICE_TABLE(of, anarion_dwmac_match);
static struct platform_driver anarion_dwmac_driver = {
.probe = anarion_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "anarion-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index ef8f3a940938..ef1023930fd0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -87,7 +87,7 @@ MODULE_DEVICE_TABLE(of, dwmac_generic_match);
static struct platform_driver dwmac_generic_driver = {
.probe = dwmac_generic_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = STMMAC_RESOURCE_NAME,
.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 7c228bd0d099..b9378a63f0e8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
@@ -376,7 +376,7 @@ MODULE_DEVICE_TABLE(of, imx_dwmac_match);
static struct platform_driver imx_dwmac_driver = {
.probe = imx_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 378b4dd826bb..8063ba1c3ce8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c
@@ -386,7 +386,7 @@ MODULE_DEVICE_TABLE(of, ingenic_mac_of_matches);
static struct platform_driver ingenic_mac_driver = {
.probe = ingenic_mac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 06d287f104be..a5e639ab0b9e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
@@ -169,20 +169,17 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
return ret;
}
-static int intel_eth_plat_remove(struct platform_device *pdev)
+static void intel_eth_plat_remove(struct platform_device *pdev)
{
struct intel_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
- int ret;
- ret = stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove(pdev);
clk_disable_unprepare(dwmac->tx_clk);
-
- return ret;
}
static struct platform_driver intel_eth_plat_driver = {
.probe = intel_eth_plat_probe,
- .remove = intel_eth_plat_remove,
+ .remove_new = intel_eth_plat_remove,
.driver = {
.name = "intel-eth-plat",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
index e888c8a9c830..e39406df8516 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
@@ -498,7 +498,7 @@ MODULE_DEVICE_TABLE(of, ipq806x_gmac_dwmac_match);
static struct platform_driver ipq806x_gmac_dwmac_driver = {
.probe = ipq806x_gmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 9d77c647badd..18e84ba693a6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c
@@ -83,7 +83,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_dwmac_match);
static struct platform_driver lpc18xx_dwmac_driver = {
.probe = lpc18xx_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 9ae31e3dc821..73c1dfa7ecb1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -678,15 +678,12 @@ static int mediatek_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int mediatek_dwmac_remove(struct platform_device *pdev)
+static void mediatek_dwmac_remove(struct platform_device *pdev)
{
struct mediatek_dwmac_plat_data *priv_plat = get_stmmac_bsp_priv(&pdev->dev);
- int ret;
- ret = stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove(pdev);
mediatek_dwmac_clks_config(priv_plat, false);
-
- return ret;
}
static const struct of_device_id mediatek_dwmac_match[] = { @@ -701,7 +698,7 @@ MODULE_DEVICE_TABLE(of, mediatek_dwmac_match);
static struct platform_driver mediatek_dwmac_driver = {
.probe = mediatek_dwmac_probe,
- .remove = mediatek_dwmac_remove,
+ .remove_new = mediatek_dwmac_remove,
.driver = {
.name = "dwmac-mediatek",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
index 16fb66a0ca72..7aa5e6bc04eb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
@@ -91,7 +91,7 @@ MODULE_DEVICE_TABLE(of, meson6_dwmac_match);
static struct platform_driver meson6_dwmac_driver = {
.probe = meson6_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .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 f6754e3643f3..92b16048f91c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
@@ -539,7 +539,7 @@ MODULE_DEVICE_TABLE(of, meson8b_dwmac_match);
static struct platform_driver meson8b_dwmac_driver = {
.probe = meson8b_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "meson8b-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
index 62a69a91ab22..42954020de2c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
@@ -231,7 +231,7 @@ MODULE_DEVICE_TABLE(of, oxnas_dwmac_match);
static struct platform_driver oxnas_dwmac_driver = {
.probe = oxnas_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "oxnas-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 16a8c361283b..494c22243259 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -668,16 +668,15 @@ static int qcom_ethqos_probe(struct platform_device *pdev) static int qcom_ethqos_remove(struct platform_device *pdev) {
struct qcom_ethqos *ethqos;
- int ret;
ethqos = get_stmmac_bsp_priv(&pdev->dev);
if (!ethqos)
return -ENODEV;
- ret = stmmac_pltfr_remove(pdev);
+ stmmac_pltfr_remove(pdev);
ethqos_clks_config(ethqos, false);
- return ret;
+ return 0;
}
static const struct of_device_id qcom_ethqos_match[] = { diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 6b447d8f0bd8..6ee050300b31 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -524,7 +524,7 @@ MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
static struct platform_driver socfpga_dwmac_driver = {
.probe = socfpga_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "socfpga-dwmac",
.pm = &socfpga_dwmac_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
index 4f51a7889642..d3a39d2fb3a9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
@@ -156,7 +156,7 @@ MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
static struct platform_driver starfive_dwmac_driver = {
.probe = starfive_dwmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "starfive-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
index fc3b0acc8f99..50963e91c347 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
@@ -179,7 +179,7 @@ MODULE_DEVICE_TABLE(of, sun7i_dwmac_match);
static struct platform_driver sun7i_dwmac_driver = {
.probe = sun7i_gmac_probe,
- .remove = stmmac_pltfr_remove,
+ .remove_new = stmmac_pltfr_remove,
.driver = {
.name = "sun7i-dwmac",
.pm = &stmmac_pltfr_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
index c3f10a92b62b..d43da71eb1e1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
@@ -265,9 +265,7 @@ static int visconti_eth_dwmac_remove(struct platform_device *pdev)
struct stmmac_priv *priv = netdev_priv(ndev);
int err;
- err = stmmac_pltfr_remove(pdev);
- if (err < 0)
- dev_err(&pdev->dev, "failed to remove platform: %d\n", err);
+ stmmac_pltfr_remove(pdev);
err = visconti_eth_clock_remove(pdev);
if (err < 0)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index eb0b2898daa3..3c6b55b60461 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -707,7 +707,7 @@ EXPORT_SYMBOL_GPL(stmmac_get_platform_resources);
* Description: this function calls the main to free the net resources
* and calls the platforms hook and release the resources (e.g. mem).
*/
-int stmmac_pltfr_remove(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); @@ -719,8 +719,6 @@ int stmmac_pltfr_remove(struct platform_device *pdev)
plat->exit(pdev, plat->bsp_priv);
stmmac_remove_config_dt(pdev, plat);
-
- return 0;
}
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 3fff3f59d73d..f7e457946681 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
@@ -19,7 +19,7 @@ void stmmac_remove_config_dt(struct platform_device *pdev, int stmmac_get_platform_resources(struct platform_device *pdev,
struct stmmac_resources *stmmac_res);
-int stmmac_pltfr_remove(struct platform_device *pdev);
+void stmmac_pltfr_remove(struct platform_device *pdev);
extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
static inline void *get_stmmac_bsp_priv(struct device *dev)
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void
2023-05-08 14:47 ` Peppe CAVALLARO
@ 2023-05-08 17:19 ` Uwe Kleine-König
0 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 17:19 UTC (permalink / raw)
To: Peppe CAVALLARO
Cc: Alexandre TORGUE - foss, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Shawn Guo, Sascha Hauer, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Vinod Koul, Emil Renner Berthing, Samin Guo,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Nobuhiro Iwamatsu,
Matthias Brugger, linux-oxnas@groups.io, Bhupesh Sharma,
Martin Blumenstingl, netdev@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-mediatek@lists.infradead.org,
NXP Linux Team, kernel@pengutronix.de, Simon Horman,
linux-amlogic@lists.infradead.org, Jerome Brunet, Fabio Estevam,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno
[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]
Hello,
On Mon, May 08, 2023 at 02:47:36PM +0000, Peppe CAVALLARO wrote:
> Thx for this patch train, maybe I missed the cover letter. In my
> opinion the proposed change is intrusive but I can accept. It could be
> great to enhance the platform remove functions to fail in case of an
> expected case occurs.
Not sure I understand what you want. platform_remove() (i.e. the caller
of the remove callback) emits a warning if .remove() returns an value !=
0.
In the Linux driver model remove functions are not supposed to fail. The
most usual case for a driver unbind (aka remove) is that the device in
question disappeared (think hotplug). There is no value in failing, what
should happen if the driver fails? There is no chance to reenter
.remove() as some resources might already be freed.
> + .remove_new = stmmac_pltfr_remove,
>
> To be honest, I do not like to see: ".remove_new" as hook
.remove_new() is not here to say. Once all drivers are converted,
.remove() is changed to get the same semantics as .remove_new() has now
and then after all drivers are converted back to .remove() .remove_new()
will be dropped. See 5c5a7680e67ba6fbbb5f4d79fa41485450c1985c for some
more details.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void
2023-05-08 14:26 ` [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void Uwe Kleine-König
2023-05-08 14:47 ` Peppe CAVALLARO
@ 2023-05-08 19:38 ` Martin Blumenstingl
1 sibling, 0 replies; 23+ messages in thread
From: Martin Blumenstingl @ 2023-05-08 19:38 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Shawn Guo, Sascha Hauer, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Vinod Koul, Emil Renner Berthing, Samin Guo,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Nobuhiro Iwamatsu,
Matthias Brugger, Fabio Estevam, NXP Linux Team, Jerome Brunet,
Bhupesh Sharma, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, kernel, linux-amlogic, linux-oxnas, linux-sunxi,
linux-mediatek, Simon Horman
On Mon, May 8, 2023 at 4:27 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The function returns zero unconditionally. Change it to return void instead
> which simplifies some callers as error handing becomes unnecessary.
>
> The function is also used for some drivers as remove callback. Switch these
> to the .remove_new() callback. For some others no error can happen in the
> remove callback now, convert them to .remove_new(), too.
>
> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 9 +++------
> drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 9 +++------
> drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 2 +-
For these two Amlogic Meson drivers:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 19:33 ` Simon Horman
2023-05-09 1:33 ` nobuhiro1.iwamatsu
2023-05-08 14:26 ` [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition Uwe Kleine-König
` (10 subsequent siblings)
12 siblings, 2 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Nobuhiro Iwamatsu
Cc: netdev, linux-stm32, linux-arm-kernel, kernel
The function returns zero unconditionally. Change it to return void
instead which simplifies one caller as error handing becomes
unnecessary.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
index d43da71eb1e1..56209af6243c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
@@ -198,7 +198,7 @@ static int visconti_eth_clock_probe(struct platform_device *pdev,
return 0;
}
-static int visconti_eth_clock_remove(struct platform_device *pdev)
+static void visconti_eth_clock_remove(struct platform_device *pdev)
{
struct visconti_eth *dwmac = get_stmmac_bsp_priv(&pdev->dev);
struct net_device *ndev = platform_get_drvdata(pdev);
@@ -206,8 +206,6 @@ static int visconti_eth_clock_remove(struct platform_device *pdev)
clk_disable_unprepare(dwmac->phy_ref_clk);
clk_disable_unprepare(priv->plat->stmmac_clk);
-
- return 0;
}
static int visconti_eth_dwmac_probe(struct platform_device *pdev)
@@ -263,17 +261,14 @@ static int visconti_eth_dwmac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *priv = netdev_priv(ndev);
- int err;
stmmac_pltfr_remove(pdev);
- err = visconti_eth_clock_remove(pdev);
- if (err < 0)
- dev_err(&pdev->dev, "failed to remove clock: %d\n", err);
+ visconti_eth_clock_remove(pdev);
stmmac_remove_config_dt(pdev, priv->plat);
- return err;
+ return 0;
}
static const struct of_device_id visconti_eth_dwmac_match[] = {
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void
2023-05-08 14:26 ` [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() " Uwe Kleine-König
@ 2023-05-08 19:33 ` Simon Horman
2023-05-09 1:33 ` nobuhiro1.iwamatsu
1 sibling, 0 replies; 23+ messages in thread
From: Simon Horman @ 2023-05-08 19:33 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Nobuhiro Iwamatsu, netdev, linux-stm32, linux-arm-kernel, kernel
On Mon, May 08, 2023 at 04:26:28PM +0200, Uwe Kleine-König wrote:
> The function returns zero unconditionally. Change it to return void
> instead which simplifies one caller as error handing becomes
> unnecessary.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void
2023-05-08 14:26 ` [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() " Uwe Kleine-König
2023-05-08 19:33 ` Simon Horman
@ 2023-05-09 1:33 ` nobuhiro1.iwamatsu
1 sibling, 0 replies; 23+ messages in thread
From: nobuhiro1.iwamatsu @ 2023-05-09 1:33 UTC (permalink / raw)
To: u.kleine-koenig, peppe.cavallaro, alexandre.torgue, joabreu,
davem, edumazet, kuba, pabeni, mcoquelin.stm32
Cc: netdev, linux-stm32, linux-arm-kernel, kernel
Hi Uwe,
> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, May 8, 2023 11:26 PM
> To: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
> <alexandre.torgue@foss.st.com>; Jose Abreu <joabreu@synopsys.com>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; Maxime Coquelin <mcoquelin.stm32@gmail.com>;
> iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>
> Cc: netdev@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com;
> linux-arm-kernel@lists.infradead.org; kernel@pengutronix.de
> Subject: [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make
> visconti_eth_clock_remove() return void
>
> The function returns zero unconditionally. Change it to return void instead
> which simplifies one caller as error handing becomes unnecessary.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 01/11] net: stmmac: Make stmmac_pltfr_remove() return void Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 20:26 ` Michal Kubiak
2023-05-08 14:26 ` [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void Uwe Kleine-König
` (9 subsequent siblings)
12 siblings, 1 reply; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Vinod Koul, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin
Cc: Bhupesh Sharma, netdev, linux-stm32, linux-arm-kernel, kernel,
Simon Horman
The remove callback is only ever called after .probe() returned
successfully. After that get_stmmac_bsp_priv() always return non-NULL.
Side note: The early exit would also be a bug because the return value
of qcom_ethqos_remove() is ignored by the device core and the device is
unbound unconditionally. So exiting early resulted in a dangerous
resource leak as all devm allocated resources (some memory and the
register mappings) are freed but the network device stays around. Using
the network device afterwards probably oopses.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 494c22243259..bf17c6c8f2eb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -667,11 +667,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
static int qcom_ethqos_remove(struct platform_device *pdev)
{
- struct qcom_ethqos *ethqos;
-
- ethqos = get_stmmac_bsp_priv(&pdev->dev);
- if (!ethqos)
- return -ENODEV;
+ struct qcom_ethqos *ethqos = get_stmmac_bsp_priv(&pdev->dev);
stmmac_pltfr_remove(pdev);
ethqos_clks_config(ethqos, false);
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition
2023-05-08 14:26 ` [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition Uwe Kleine-König
@ 2023-05-08 20:26 ` Michal Kubiak
0 siblings, 0 replies; 23+ messages in thread
From: Michal Kubiak @ 2023-05-08 20:26 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Vinod Koul, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Bhupesh Sharma, netdev, linux-stm32,
linux-arm-kernel, kernel, Simon Horman
On Mon, May 08, 2023 at 04:26:29PM +0200, Uwe Kleine-König wrote:
> The remove callback is only ever called after .probe() returned
> successfully. After that get_stmmac_bsp_priv() always return non-NULL.
Nitpick: "always returns" or "will always return".
>
> Side note: The early exit would also be a bug because the return value
> of qcom_ethqos_remove() is ignored by the device core and the device is
> unbound unconditionally. So exiting early resulted in a dangerous
> resource leak as all devm allocated resources (some memory and the
> register mappings) are freed but the network device stays around. Using
> the network device afterwards probably oopses.
>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
Thanks,
Michal
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (2 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-09 2:28 ` nobuhiro1.iwamatsu
2023-05-08 14:26 ` [PATCH net-next v2 05/11] net: stmmac: dwmac-dwc-qos-eth: " Uwe Kleine-König
` (8 subsequent siblings)
12 siblings, 1 reply; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Nobuhiro Iwamatsu,
Maxime Coquelin
Cc: netdev, linux-arm-kernel, linux-stm32, kernel, Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
index 56209af6243c..acbb284be174 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
@@ -257,7 +257,7 @@ static int visconti_eth_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int visconti_eth_dwmac_remove(struct platform_device *pdev)
+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);
@@ -267,8 +267,6 @@ static int visconti_eth_dwmac_remove(struct platform_device *pdev)
visconti_eth_clock_remove(pdev);
stmmac_remove_config_dt(pdev, priv->plat);
-
- return 0;
}
static const struct of_device_id visconti_eth_dwmac_match[] = {
@@ -279,7 +277,7 @@ MODULE_DEVICE_TABLE(of, visconti_eth_dwmac_match);
static struct platform_driver visconti_eth_dwmac_driver = {
.probe = visconti_eth_dwmac_probe,
- .remove = visconti_eth_dwmac_remove,
+ .remove_new = visconti_eth_dwmac_remove,
.driver = {
.name = "visconti-eth-dwmac",
.of_match_table = visconti_eth_dwmac_match,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* RE: [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void
2023-05-08 14:26 ` [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-05-09 2:28 ` nobuhiro1.iwamatsu
0 siblings, 0 replies; 23+ messages in thread
From: nobuhiro1.iwamatsu @ 2023-05-09 2:28 UTC (permalink / raw)
To: u.kleine-koenig, peppe.cavallaro, alexandre.torgue, joabreu,
davem, edumazet, kuba, pabeni, mcoquelin.stm32
Cc: netdev, linux-arm-kernel, linux-stm32, kernel, simon.horman
Hi Uwe,
> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Monday, May 8, 2023 11:27 PM
> To: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
> <alexandre.torgue@foss.st.com>; Jose Abreu <joabreu@synopsys.com>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○
> OST) <nobuhiro1.iwamatsu@toshiba.co.jp>; Maxime Coquelin
> <mcoquelin.stm32@gmail.com>
> Cc: netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-stm32@st-md-mailman.stormreply.com; kernel@pengutronix.de; Simon
> Horman <simon.horman@corigine.com>
> Subject: [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to
> platform remove callback returning void
>
> The .remove() callback for a platform driver returns an int which makes many
> driver authors wrongly assume it's possible to do error handling by returning an
> error code. However the value returned is (mostly) ignored and this typically
> results in resource leaks. To improve here there is a quest to make the remove
> callback return void. In the first step of this quest all drivers are converted
> to .remove_new() which already returns void.
>
> Trivially convert this driver from always returning zero in the remove callback to
> the void returning variant.
>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH net-next v2 05/11] net: stmmac: dwmac-dwc-qos-eth: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (3 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: " Uwe Kleine-König
` (7 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin
Cc: netdev, linux-stm32, linux-arm-kernel, kernel, Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 6 ++----
1 file changed, 2 insertions(+), 4 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 18acf7dd74e5..9f88530c5e8c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -464,7 +464,7 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int dwc_eth_dwmac_remove(struct platform_device *pdev)
+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);
@@ -477,8 +477,6 @@ static int dwc_eth_dwmac_remove(struct platform_device *pdev)
data->remove(pdev);
stmmac_remove_config_dt(pdev, priv->plat);
-
- return 0;
}
static const struct of_device_id dwc_eth_dwmac_match[] = {
@@ -490,7 +488,7 @@ MODULE_DEVICE_TABLE(of, dwc_eth_dwmac_match);
static struct platform_driver dwc_eth_dwmac_driver = {
.probe = dwc_eth_dwmac_probe,
- .remove = dwc_eth_dwmac_remove,
+ .remove_new = dwc_eth_dwmac_remove,
.driver = {
.name = "dwc-eth-dwmac",
.pm = &stmmac_pltfr_pm_ops,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (4 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 05/11] net: stmmac: dwmac-dwc-qos-eth: " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-09 7:51 ` Bhupesh Sharma
2023-05-08 14:26 ` [PATCH net-next v2 07/11] net: stmmac: dwmac-rk: " Uwe Kleine-König
` (6 subsequent siblings)
12 siblings, 1 reply; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Vinod Koul, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin
Cc: Bhupesh Sharma, netdev, linux-stm32, linux-arm-kernel, kernel,
Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index bf17c6c8f2eb..1db97a5209c4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -665,14 +665,12 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
return ret;
}
-static int qcom_ethqos_remove(struct platform_device *pdev)
+static void qcom_ethqos_remove(struct platform_device *pdev)
{
struct qcom_ethqos *ethqos = get_stmmac_bsp_priv(&pdev->dev);
stmmac_pltfr_remove(pdev);
ethqos_clks_config(ethqos, false);
-
- return 0;
}
static const struct of_device_id qcom_ethqos_match[] = {
@@ -685,7 +683,7 @@ MODULE_DEVICE_TABLE(of, qcom_ethqos_match);
static struct platform_driver qcom_ethqos_driver = {
.probe = qcom_ethqos_probe,
- .remove = qcom_ethqos_remove,
+ .remove_new = qcom_ethqos_remove,
.driver = {
.name = "qcom-ethqos",
.pm = &stmmac_pltfr_pm_ops,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: Convert to platform remove callback returning void
2023-05-08 14:26 ` [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: " Uwe Kleine-König
@ 2023-05-09 7:51 ` Bhupesh Sharma
2023-05-10 6:29 ` Uwe Kleine-König
0 siblings, 1 reply; 23+ messages in thread
From: Bhupesh Sharma @ 2023-05-09 7:51 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Vinod Koul, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, netdev, linux-stm32, linux-arm-kernel, kernel,
Simon Horman
Hi Uwe,
On Mon, 8 May 2023 at 19:56, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
^^^ mostly, here seems confusing. Only if the return value is ignored
marking the function
as 'void' makes sense IMO.
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index bf17c6c8f2eb..1db97a5209c4 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -665,14 +665,12 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> return ret;
> }
>
> -static int qcom_ethqos_remove(struct platform_device *pdev)
> +static void qcom_ethqos_remove(struct platform_device *pdev)
> {
> struct qcom_ethqos *ethqos = get_stmmac_bsp_priv(&pdev->dev);
>
> stmmac_pltfr_remove(pdev);
> ethqos_clks_config(ethqos, false);
> -
> - return 0;
> }
>
> static const struct of_device_id qcom_ethqos_match[] = {
> @@ -685,7 +683,7 @@ MODULE_DEVICE_TABLE(of, qcom_ethqos_match);
>
> static struct platform_driver qcom_ethqos_driver = {
> .probe = qcom_ethqos_probe,
> - .remove = qcom_ethqos_remove,
> + .remove_new = qcom_ethqos_remove,
> .driver = {
> .name = "qcom-ethqos",
> .pm = &stmmac_pltfr_pm_ops,
> --
> 2.39.2
Also a small note (maybe a TBD) indicating that 'remove_new' will be
eventually replaced with 'remove' would make reading this easier. Rest
seems fine, so:
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Thanks.
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: Convert to platform remove callback returning void
2023-05-09 7:51 ` Bhupesh Sharma
@ 2023-05-10 6:29 ` Uwe Kleine-König
0 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-10 6:29 UTC (permalink / raw)
To: Bhupesh Sharma
Cc: kernel, Eric Dumazet, netdev, Alexandre Torgue, linux-stm32,
Vinod Koul, Jose Abreu, Maxime Coquelin, Jakub Kicinski,
Simon Horman, Giuseppe Cavallaro, Paolo Abeni, David S. Miller,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]
Hello Bhupesh,
On Tue, May 09, 2023 at 01:21:56PM +0530, Bhupesh Sharma wrote:
> On Mon, 8 May 2023 at 19:56, Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > The .remove() callback for a platform driver returns an int which makes
> > many driver authors wrongly assume it's possible to do error handling by
> > returning an error code. However the value returned is (mostly) ignored
>
> ^^^ mostly, here seems confusing. Only if the return value is ignored
> marking the function
> as 'void' makes sense IMO.
FTR: It's only mostly ignored because a message is emitted:
dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");
(see platform_remove() in drivers/base/platform.c).
> Also a small note (maybe a TBD) indicating that 'remove_new' will be
> eventually replaced with 'remove' would make reading this easier.
I adapted the commit message for future similar submissions. Thanks for
the feedback.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH net-next v2 07/11] net: stmmac: dwmac-rk: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (5 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 06/11] net: stmmac: dwmac-qcom-ethqos: " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 08/11] net: stmmac: dwmac-sti: " Uwe Kleine-König
` (5 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin
Cc: netdev, linux-stm32, linux-arm-kernel, kernel, Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 4ea31ccf24d0..d81591b470a2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1863,15 +1863,13 @@ static int rk_gmac_probe(struct platform_device *pdev)
return ret;
}
-static int rk_gmac_remove(struct platform_device *pdev)
+static void rk_gmac_remove(struct platform_device *pdev)
{
struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev);
stmmac_dvr_remove(&pdev->dev);
rk_gmac_powerdown(bsp_priv);
-
- return 0;
}
#ifdef CONFIG_PM_SLEEP
@@ -1925,7 +1923,7 @@ MODULE_DEVICE_TABLE(of, rk_gmac_dwmac_match);
static struct platform_driver rk_gmac_dwmac_driver = {
.probe = rk_gmac_probe,
- .remove = rk_gmac_remove,
+ .remove_new = rk_gmac_remove,
.driver = {
.name = "rk_gmac-dwmac",
.pm = &rk_gmac_pm_ops,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH net-next v2 08/11] net: stmmac: dwmac-sti: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (6 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 07/11] net: stmmac: dwmac-rk: " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 09/11] net: stmmac: dwmac-stm32: " Uwe Kleine-König
` (4 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin
Cc: netdev, linux-stm32, linux-arm-kernel, kernel, Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 465ce66ef9c1..dcbb17c4f07a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -317,15 +317,13 @@ static int sti_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int sti_dwmac_remove(struct platform_device *pdev)
+static void sti_dwmac_remove(struct platform_device *pdev)
{
struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
stmmac_dvr_remove(&pdev->dev);
clk_disable_unprepare(dwmac->clk);
-
- return 0;
}
#ifdef CONFIG_PM_SLEEP
@@ -365,7 +363,7 @@ MODULE_DEVICE_TABLE(of, sti_dwmac_match);
static struct platform_driver sti_dwmac_driver = {
.probe = sti_dwmac_probe,
- .remove = sti_dwmac_remove,
+ .remove_new = sti_dwmac_remove,
.driver = {
.name = "sti-dwmac",
.pm = &sti_dwmac_pm_ops,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH net-next v2 09/11] net: stmmac: dwmac-stm32: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (7 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 08/11] net: stmmac: dwmac-sti: " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 10/11] net: stmmac: dwmac-sun8i: " Uwe Kleine-König
` (3 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin
Cc: netdev, linux-stm32, linux-arm-kernel, kernel, Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 0616b3a04ff3..bdb4de59a672 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -417,7 +417,7 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int stm32_dwmac_remove(struct platform_device *pdev)
+static void stm32_dwmac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *priv = netdev_priv(ndev);
@@ -431,8 +431,6 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
dev_pm_clear_wake_irq(&pdev->dev);
device_init_wakeup(&pdev->dev, false);
}
-
- return 0;
}
static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
@@ -528,7 +526,7 @@ MODULE_DEVICE_TABLE(of, stm32_dwmac_match);
static struct platform_driver stm32_dwmac_driver = {
.probe = stm32_dwmac_probe,
- .remove = stm32_dwmac_remove,
+ .remove_new = stm32_dwmac_remove,
.driver = {
.name = "stm32-dwmac",
.pm = &stm32_dwmac_pm_ops,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH net-next v2 10/11] net: stmmac: dwmac-sun8i: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (8 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 09/11] net: stmmac: dwmac-stm32: " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 14:26 ` [PATCH net-next v2 11/11] net: stmmac: dwmac-tegra: " Uwe Kleine-König
` (2 subsequent siblings)
12 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: netdev, linux-stm32, linux-arm-kernel, linux-sunxi, kernel,
Simon Horman
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index c2c592ba0eb8..1e714380d125 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1294,7 +1294,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
return ret;
}
-static int sun8i_dwmac_remove(struct platform_device *pdev)
+static void sun8i_dwmac_remove(struct platform_device *pdev)
{
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *priv = netdev_priv(ndev);
@@ -1309,8 +1309,6 @@ static int sun8i_dwmac_remove(struct platform_device *pdev)
stmmac_pltfr_remove(pdev);
sun8i_dwmac_unset_syscon(gmac);
-
- return 0;
}
static void sun8i_dwmac_shutdown(struct platform_device *pdev)
@@ -1341,7 +1339,7 @@ MODULE_DEVICE_TABLE(of, sun8i_dwmac_match);
static struct platform_driver sun8i_dwmac_driver = {
.probe = sun8i_dwmac_probe,
- .remove = sun8i_dwmac_remove,
+ .remove_new = sun8i_dwmac_remove,
.shutdown = sun8i_dwmac_shutdown,
.driver = {
.name = "dwmac-sun8i",
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH net-next v2 11/11] net: stmmac: dwmac-tegra: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (9 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 10/11] net: stmmac: dwmac-sun8i: " Uwe Kleine-König
@ 2023-05-08 14:26 ` Uwe Kleine-König
2023-05-08 20:30 ` [PATCH net-next v2 00/11] net: stmmac: " Michal Kubiak
2023-05-10 3:00 ` patchwork-bot+netdevbpf
12 siblings, 0 replies; 23+ messages in thread
From: Uwe Kleine-König @ 2023-05-08 14:26 UTC (permalink / raw)
To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Thierry Reding, Jonathan Hunter
Cc: netdev, linux-stm32, linux-arm-kernel, linux-tegra, kernel,
Simon Horman, Thierry Reding
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.
Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
index bdf990cf2f31..f8367c5b490b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
@@ -353,15 +353,13 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
return err;
}
-static int tegra_mgbe_remove(struct platform_device *pdev)
+static void tegra_mgbe_remove(struct platform_device *pdev)
{
struct tegra_mgbe *mgbe = get_stmmac_bsp_priv(&pdev->dev);
clk_bulk_disable_unprepare(ARRAY_SIZE(mgbe_clks), mgbe->clks);
stmmac_pltfr_remove(pdev);
-
- return 0;
}
static const struct of_device_id tegra_mgbe_match[] = {
@@ -374,7 +372,7 @@ static SIMPLE_DEV_PM_OPS(tegra_mgbe_pm_ops, tegra_mgbe_suspend, tegra_mgbe_resum
static struct platform_driver tegra_mgbe_driver = {
.probe = tegra_mgbe_probe,
- .remove = tegra_mgbe_remove,
+ .remove_new = tegra_mgbe_remove,
.driver = {
.name = "tegra-mgbe",
.pm = &tegra_mgbe_pm_ops,
--
2.39.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (10 preceding siblings ...)
2023-05-08 14:26 ` [PATCH net-next v2 11/11] net: stmmac: dwmac-tegra: " Uwe Kleine-König
@ 2023-05-08 20:30 ` Michal Kubiak
2023-05-10 3:00 ` patchwork-bot+netdevbpf
12 siblings, 0 replies; 23+ messages in thread
From: Michal Kubiak @ 2023-05-08 20:30 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Shawn Guo, Sascha Hauer, Vladimir Zapolskiy, Neil Armstrong,
Kevin Hilman, Vinod Koul, Emil Renner Berthing, Samin Guo,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Nobuhiro Iwamatsu,
Matthias Brugger, Thierry Reding, Jonathan Hunter, Fabio Estevam,
NXP Linux Team, Jerome Brunet, Martin Blumenstingl,
Bhupesh Sharma, AngeloGioacchino Del Regno, netdev, linux-stm32,
linux-arm-kernel, kernel, linux-amlogic, linux-oxnas, linux-sunxi,
linux-mediatek, linux-tegra
On Mon, May 08, 2023 at 04:26:26PM +0200, Uwe Kleine-König wrote:
> Hello,
>
> (implicit) v1 of this series is available at
> https://lore.kernel.org/netdev/20230402143025.2524443-1-u.kleine-koenig@pengutronix.de
> .
>
> Changes since then:
>
> - Added various Reviewed-by: and Acked-by: tags received for v1
> - Removed a variable in an earlier patch to make all intermediate steps
> compilable, spotted by Simon Horman
> - Rebased to v6.4-rc1 (which needed a slight adaption to cope for
> 4bd3bb7b4526 ("net: stmmac: Add glue layer for StarFive JH7110 SoC"))
>
> Best regards
> Uwe
>
For the series:
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
(Just a very minor nitpick in the commit message of patch 3).
> --
> 2.39.2
>
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void
2023-05-08 14:26 [PATCH net-next v2 00/11] net: stmmac: Convert to platform remove callback returning void Uwe Kleine-König
` (11 preceding siblings ...)
2023-05-08 20:30 ` [PATCH net-next v2 00/11] net: stmmac: " Michal Kubiak
@ 2023-05-10 3:00 ` patchwork-bot+netdevbpf
12 siblings, 0 replies; 23+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-10 3:00 UTC (permalink / raw)
To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=3Cu=2Ekleine-koenig=40pengutronix=2Ede=3E?=
Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, edumazet, kuba,
pabeni, mcoquelin.stm32, shawnguo, s.hauer, vz, neil.armstrong,
khilman, vkoul, kernel, samin.guo, wens, jernej.skrabec, samuel,
nobuhiro1.iwamatsu, matthias.bgg, thierry.reding, jonathanh,
festevam, linux-imx, jbrunet, martin.blumenstingl, bhupesh.sharma,
angelogioacchino.delregno, netdev, linux-stm32, linux-arm-kernel,
kernel, linux-amlogic, linux-oxnas, linux-sunxi, linux-mediatek,
linux-tegra
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 8 May 2023 16:26:26 +0200 you wrote:
> Hello,
>
> (implicit) v1 of this series is available at
> https://lore.kernel.org/netdev/20230402143025.2524443-1-u.kleine-koenig@pengutronix.de
> .
>
> Changes since then:
>
> [...]
Here is the summary with links:
- [net-next,v2,01/11] net: stmmac: Make stmmac_pltfr_remove() return void
https://git.kernel.org/netdev/net-next/c/3246627f11c5
- [net-next,v2,02/11] net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void
https://git.kernel.org/netdev/net-next/c/b9bc44fe068d
- [net-next,v2,03/11] net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition
https://git.kernel.org/netdev/net-next/c/c5f3ffe35cc9
- [net-next,v2,04/11] net: stmmac: dwmac-visconti: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/f4d05c419761
- [net-next,v2,05/11] net: stmmac: dwmac-dwc-qos-eth: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/360cd89064b6
- [net-next,v2,06/11] net: stmmac: dwmac-qcom-ethqos: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/5580b559a80a
- [net-next,v2,07/11] net: stmmac: dwmac-rk: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/903cc461c901
- [net-next,v2,08/11] net: stmmac: dwmac-sti: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/b394982a10d9
- [net-next,v2,09/11] net: stmmac: dwmac-stm32: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/fec3f552140e
- [net-next,v2,10/11] net: stmmac: dwmac-sun8i: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/cc708d4ed7b3
- [net-next,v2,11/11] net: stmmac: dwmac-tegra: Convert to platform remove callback returning void
https://git.kernel.org/netdev/net-next/c/a86f8601c8f0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 23+ messages in thread