All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
@ 2023-02-11 11:24 ` Uwe Kleine-König
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-02-11 11:24 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-stm32, linux-arm-kernel, kernel

The function returns zero unconditionally. Change it to return void instead
which simplifies some callers as error handing becomes unnecessary.

This also makes it more obvious that most platform remove callbacks always
return zero.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 +---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c          | 5 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c         | 5 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c       | 5 +++--
 drivers/net/ethernet/stmicro/stmmac/stmmac.h            | 2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c       | 4 +---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c   | 5 +++--
 7 files changed, 15 insertions(+), 15 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 80efdeeb0b59..87a2c1a18638 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -477,9 +477,7 @@ static int dwc_eth_dwmac_remove(struct platform_device *pdev)
 
 	data = device_get_match_data(&pdev->dev);
 
-	err = stmmac_dvr_remove(&pdev->dev);
-	if (err < 0)
-		dev_err(&pdev->dev, "failed to remove platform: %d\n", err);
+	stmmac_dvr_remove(&pdev->dev);
 
 	err = data->remove(pdev);
 	if (err < 0)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 6656d76b6766..4b8fd11563e4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1915,11 +1915,12 @@ static int rk_gmac_probe(struct platform_device *pdev)
 static int rk_gmac_remove(struct platform_device *pdev)
 {
 	struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev);
-	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	stmmac_dvr_remove(&pdev->dev);
 
 	rk_gmac_powerdown(bsp_priv);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 710d7435733e..be3b1ebc06ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -371,11 +371,12 @@ static int sti_dwmac_probe(struct platform_device *pdev)
 static int sti_dwmac_remove(struct platform_device *pdev)
 {
 	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
-	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	stmmac_dvr_remove(&pdev->dev);
 
 	clk_disable_unprepare(dwmac->clk);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 2b38a499a404..0616b3a04ff3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -421,9 +421,10 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
 {
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
-	int ret = stmmac_dvr_remove(&pdev->dev);
 	struct stm32_dwmac *dwmac = priv->plat->bsp_priv;
 
+	stmmac_dvr_remove(&pdev->dev);
+
 	stm32_dwmac_clk_disable(priv->plat->bsp_priv);
 
 	if (dwmac->irq_pwr_wakeup >= 0) {
@@ -431,7 +432,7 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
 		device_init_wakeup(&pdev->dev, false);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index bdbf86cb102a..3d15e1e92e18 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -345,7 +345,7 @@ int stmmac_xdp_open(struct net_device *dev);
 void stmmac_xdp_release(struct net_device *dev);
 int stmmac_resume(struct device *dev);
 int stmmac_suspend(struct device *dev);
-int stmmac_dvr_remove(struct device *dev);
+void stmmac_dvr_remove(struct device *dev);
 int stmmac_dvr_probe(struct device *device,
 		     struct plat_stmmacenet_data *plat_dat,
 		     struct stmmac_resources *res);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c6951c976f5d..97bcfb628463 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7341,7 +7341,7 @@ EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
  * Description: this function resets the TX/RX processes, disables the MAC RX/TX
  * changes the link status, releases the DMA descriptor rings.
  */
-int stmmac_dvr_remove(struct device *dev)
+void stmmac_dvr_remove(struct device *dev)
 {
 	struct net_device *ndev = dev_get_drvdata(dev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
@@ -7377,8 +7377,6 @@ int stmmac_dvr_remove(struct device *dev)
 
 	pm_runtime_disable(dev);
 	pm_runtime_put_noidle(dev);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(stmmac_dvr_remove);
 
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index eb6d9cd8e93f..5429531ae7c7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -711,14 +711,15 @@ int 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;
-	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	stmmac_dvr_remove(&pdev->dev);
 
 	if (plat->exit)
 		plat->exit(pdev, plat->bsp_priv);
 
 	stmmac_remove_config_dt(pdev, plat);
 
-	return ret;
+	return 0;
 }
 EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
 

base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
@ 2023-02-11 11:24 ` Uwe Kleine-König
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-02-11 11:24 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-stm32, linux-arm-kernel, kernel

The function returns zero unconditionally. Change it to return void instead
which simplifies some callers as error handing becomes unnecessary.

This also makes it more obvious that most platform remove callbacks always
return zero.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 +---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c          | 5 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c         | 5 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c       | 5 +++--
 drivers/net/ethernet/stmicro/stmmac/stmmac.h            | 2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c       | 4 +---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c   | 5 +++--
 7 files changed, 15 insertions(+), 15 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 80efdeeb0b59..87a2c1a18638 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -477,9 +477,7 @@ static int dwc_eth_dwmac_remove(struct platform_device *pdev)
 
 	data = device_get_match_data(&pdev->dev);
 
-	err = stmmac_dvr_remove(&pdev->dev);
-	if (err < 0)
-		dev_err(&pdev->dev, "failed to remove platform: %d\n", err);
+	stmmac_dvr_remove(&pdev->dev);
 
 	err = data->remove(pdev);
 	if (err < 0)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 6656d76b6766..4b8fd11563e4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1915,11 +1915,12 @@ static int rk_gmac_probe(struct platform_device *pdev)
 static int rk_gmac_remove(struct platform_device *pdev)
 {
 	struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev);
-	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	stmmac_dvr_remove(&pdev->dev);
 
 	rk_gmac_powerdown(bsp_priv);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index 710d7435733e..be3b1ebc06ab 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -371,11 +371,12 @@ static int sti_dwmac_probe(struct platform_device *pdev)
 static int sti_dwmac_remove(struct platform_device *pdev)
 {
 	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
-	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	stmmac_dvr_remove(&pdev->dev);
 
 	clk_disable_unprepare(dwmac->clk);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 2b38a499a404..0616b3a04ff3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -421,9 +421,10 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
 {
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
-	int ret = stmmac_dvr_remove(&pdev->dev);
 	struct stm32_dwmac *dwmac = priv->plat->bsp_priv;
 
+	stmmac_dvr_remove(&pdev->dev);
+
 	stm32_dwmac_clk_disable(priv->plat->bsp_priv);
 
 	if (dwmac->irq_pwr_wakeup >= 0) {
@@ -431,7 +432,7 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
 		device_init_wakeup(&pdev->dev, false);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index bdbf86cb102a..3d15e1e92e18 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -345,7 +345,7 @@ int stmmac_xdp_open(struct net_device *dev);
 void stmmac_xdp_release(struct net_device *dev);
 int stmmac_resume(struct device *dev);
 int stmmac_suspend(struct device *dev);
-int stmmac_dvr_remove(struct device *dev);
+void stmmac_dvr_remove(struct device *dev);
 int stmmac_dvr_probe(struct device *device,
 		     struct plat_stmmacenet_data *plat_dat,
 		     struct stmmac_resources *res);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c6951c976f5d..97bcfb628463 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7341,7 +7341,7 @@ EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
  * Description: this function resets the TX/RX processes, disables the MAC RX/TX
  * changes the link status, releases the DMA descriptor rings.
  */
-int stmmac_dvr_remove(struct device *dev)
+void stmmac_dvr_remove(struct device *dev)
 {
 	struct net_device *ndev = dev_get_drvdata(dev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
@@ -7377,8 +7377,6 @@ int stmmac_dvr_remove(struct device *dev)
 
 	pm_runtime_disable(dev);
 	pm_runtime_put_noidle(dev);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(stmmac_dvr_remove);
 
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index eb6d9cd8e93f..5429531ae7c7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -711,14 +711,15 @@ int 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;
-	int ret = stmmac_dvr_remove(&pdev->dev);
+
+	stmmac_dvr_remove(&pdev->dev);
 
 	if (plat->exit)
 		plat->exit(pdev, plat->bsp_priv);
 
 	stmmac_remove_config_dt(pdev, plat);
 
-	return ret;
+	return 0;
 }
 EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
 

base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
-- 
2.39.0


_______________________________________________
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] 12+ messages in thread

* [PATCH 2/2] net: stmmac: dwc-qos: Make struct dwc_eth_dwmac_data::remove return void
  2023-02-11 11:24 ` Uwe Kleine-König
@ 2023-02-11 11:24   ` Uwe Kleine-König
  -1 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-02-11 11:24 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-stm32, linux-arm-kernel, kernel

All implementations of the remove callback return 0 unconditionally. So
in dwc_eth_dwmac_remove() there is no error handling necessary. Simplify
accordingly.

This is a preparation for making struct platform_driver::remove return
void, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 17 +++++------------
 1 file changed, 5 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 87a2c1a18638..18acf7dd74e5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -159,15 +159,13 @@ static int dwc_qos_probe(struct platform_device *pdev,
 	return err;
 }
 
-static int dwc_qos_remove(struct platform_device *pdev)
+static void dwc_qos_remove(struct platform_device *pdev)
 {
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
 
 	clk_disable_unprepare(priv->plat->pclk);
 	clk_disable_unprepare(priv->plat->stmmac_clk);
-
-	return 0;
 }
 
 #define SDMEMCOMPPADCTRL 0x8800
@@ -384,7 +382,7 @@ static int tegra_eqos_probe(struct platform_device *pdev,
 	return err;
 }
 
-static int tegra_eqos_remove(struct platform_device *pdev)
+static void tegra_eqos_remove(struct platform_device *pdev)
 {
 	struct tegra_eqos *eqos = get_stmmac_bsp_priv(&pdev->dev);
 
@@ -394,15 +392,13 @@ static int tegra_eqos_remove(struct platform_device *pdev)
 	clk_disable_unprepare(eqos->clk_rx);
 	clk_disable_unprepare(eqos->clk_slave);
 	clk_disable_unprepare(eqos->clk_master);
-
-	return 0;
 }
 
 struct dwc_eth_dwmac_data {
 	int (*probe)(struct platform_device *pdev,
 		     struct plat_stmmacenet_data *data,
 		     struct stmmac_resources *res);
-	int (*remove)(struct platform_device *pdev);
+	void (*remove)(struct platform_device *pdev);
 };
 
 static const struct dwc_eth_dwmac_data dwc_qos_data = {
@@ -473,19 +469,16 @@ static int 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;
-	int err;
 
 	data = device_get_match_data(&pdev->dev);
 
 	stmmac_dvr_remove(&pdev->dev);
 
-	err = data->remove(pdev);
-	if (err < 0)
-		dev_err(&pdev->dev, "failed to remove subdriver: %d\n", err);
+	data->remove(pdev);
 
 	stmmac_remove_config_dt(pdev, priv->plat);
 
-	return err;
+	return 0;
 }
 
 static const struct of_device_id dwc_eth_dwmac_match[] = {
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] net: stmmac: dwc-qos: Make struct dwc_eth_dwmac_data::remove return void
@ 2023-02-11 11:24   ` Uwe Kleine-König
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-02-11 11:24 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu
  Cc: netdev, linux-stm32, linux-arm-kernel, kernel

All implementations of the remove callback return 0 unconditionally. So
in dwc_eth_dwmac_remove() there is no error handling necessary. Simplify
accordingly.

This is a preparation for making struct platform_driver::remove return
void, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 17 +++++------------
 1 file changed, 5 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 87a2c1a18638..18acf7dd74e5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -159,15 +159,13 @@ static int dwc_qos_probe(struct platform_device *pdev,
 	return err;
 }
 
-static int dwc_qos_remove(struct platform_device *pdev)
+static void dwc_qos_remove(struct platform_device *pdev)
 {
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct stmmac_priv *priv = netdev_priv(ndev);
 
 	clk_disable_unprepare(priv->plat->pclk);
 	clk_disable_unprepare(priv->plat->stmmac_clk);
-
-	return 0;
 }
 
 #define SDMEMCOMPPADCTRL 0x8800
@@ -384,7 +382,7 @@ static int tegra_eqos_probe(struct platform_device *pdev,
 	return err;
 }
 
-static int tegra_eqos_remove(struct platform_device *pdev)
+static void tegra_eqos_remove(struct platform_device *pdev)
 {
 	struct tegra_eqos *eqos = get_stmmac_bsp_priv(&pdev->dev);
 
@@ -394,15 +392,13 @@ static int tegra_eqos_remove(struct platform_device *pdev)
 	clk_disable_unprepare(eqos->clk_rx);
 	clk_disable_unprepare(eqos->clk_slave);
 	clk_disable_unprepare(eqos->clk_master);
-
-	return 0;
 }
 
 struct dwc_eth_dwmac_data {
 	int (*probe)(struct platform_device *pdev,
 		     struct plat_stmmacenet_data *data,
 		     struct stmmac_resources *res);
-	int (*remove)(struct platform_device *pdev);
+	void (*remove)(struct platform_device *pdev);
 };
 
 static const struct dwc_eth_dwmac_data dwc_qos_data = {
@@ -473,19 +469,16 @@ static int 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;
-	int err;
 
 	data = device_get_match_data(&pdev->dev);
 
 	stmmac_dvr_remove(&pdev->dev);
 
-	err = data->remove(pdev);
-	if (err < 0)
-		dev_err(&pdev->dev, "failed to remove subdriver: %d\n", err);
+	data->remove(pdev);
 
 	stmmac_remove_config_dt(pdev, priv->plat);
 
-	return err;
+	return 0;
 }
 
 static const struct of_device_id dwc_eth_dwmac_match[] = {
-- 
2.39.0


_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
  2023-02-11 11:24 ` Uwe Kleine-König
@ 2023-02-13 14:21   ` Larysa Zaremba
  -1 siblings, 0 replies; 12+ messages in thread
From: Larysa Zaremba @ 2023-02-13 14:21 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev,
	linux-stm32, linux-arm-kernel, kernel

On Sat, Feb 11, 2023 at 12:24:30PM +0100, Uwe Kleine-König wrote:
> The function returns zero unconditionally. Change it to return void instead
> which simplifies some callers as error handing becomes unnecessary.
> 
> This also makes it more obvious that most platform remove callbacks always
> return zero.

Code in both patches looks OK.
Please, specify, which tree this patch should be in (net or net-next).
This is rather a code improvement than a fix, so net-next would be appropriate.

Also, multiple patches usually require a cover letter. The code changes are 
trivial, so maybe the best solution would be to just to squash those patches 
together.

> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 +---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c          | 5 +++--
>  drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c         | 5 +++--
>  drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c       | 5 +++--
>  drivers/net/ethernet/stmicro/stmmac/stmmac.h            | 2 +-
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c       | 4 +---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c   | 5 +++--
>  7 files changed, 15 insertions(+), 15 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 80efdeeb0b59..87a2c1a18638 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> @@ -477,9 +477,7 @@ static int dwc_eth_dwmac_remove(struct platform_device *pdev)
>  
>  	data = device_get_match_data(&pdev->dev);
>  
> -	err = stmmac_dvr_remove(&pdev->dev);
> -	if (err < 0)
> -		dev_err(&pdev->dev, "failed to remove platform: %d\n", err);
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	err = data->remove(pdev);
>  	if (err < 0)
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> index 6656d76b6766..4b8fd11563e4 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> @@ -1915,11 +1915,12 @@ static int rk_gmac_probe(struct platform_device *pdev)
>  static int rk_gmac_remove(struct platform_device *pdev)
>  {
>  	struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev);
> -	int ret = stmmac_dvr_remove(&pdev->dev);
> +
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	rk_gmac_powerdown(bsp_priv);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> index 710d7435733e..be3b1ebc06ab 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> @@ -371,11 +371,12 @@ static int sti_dwmac_probe(struct platform_device *pdev)
>  static int sti_dwmac_remove(struct platform_device *pdev)
>  {
>  	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
> -	int ret = stmmac_dvr_remove(&pdev->dev);
> +
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	clk_disable_unprepare(dwmac->clk);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> index 2b38a499a404..0616b3a04ff3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> @@ -421,9 +421,10 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
>  {
>  	struct net_device *ndev = platform_get_drvdata(pdev);
>  	struct stmmac_priv *priv = netdev_priv(ndev);
> -	int ret = stmmac_dvr_remove(&pdev->dev);
>  	struct stm32_dwmac *dwmac = priv->plat->bsp_priv;
>  
> +	stmmac_dvr_remove(&pdev->dev);
> +
>  	stm32_dwmac_clk_disable(priv->plat->bsp_priv);
>  
>  	if (dwmac->irq_pwr_wakeup >= 0) {
> @@ -431,7 +432,7 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
>  		device_init_wakeup(&pdev->dev, false);
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> index bdbf86cb102a..3d15e1e92e18 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> @@ -345,7 +345,7 @@ int stmmac_xdp_open(struct net_device *dev);
>  void stmmac_xdp_release(struct net_device *dev);
>  int stmmac_resume(struct device *dev);
>  int stmmac_suspend(struct device *dev);
> -int stmmac_dvr_remove(struct device *dev);
> +void stmmac_dvr_remove(struct device *dev);
>  int stmmac_dvr_probe(struct device *device,
>  		     struct plat_stmmacenet_data *plat_dat,
>  		     struct stmmac_resources *res);
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c6951c976f5d..97bcfb628463 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -7341,7 +7341,7 @@ EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
>   * Description: this function resets the TX/RX processes, disables the MAC RX/TX
>   * changes the link status, releases the DMA descriptor rings.
>   */
> -int stmmac_dvr_remove(struct device *dev)
> +void stmmac_dvr_remove(struct device *dev)
>  {
>  	struct net_device *ndev = dev_get_drvdata(dev);
>  	struct stmmac_priv *priv = netdev_priv(ndev);
> @@ -7377,8 +7377,6 @@ int stmmac_dvr_remove(struct device *dev)
>  
>  	pm_runtime_disable(dev);
>  	pm_runtime_put_noidle(dev);
> -
> -	return 0;
>  }
>  EXPORT_SYMBOL_GPL(stmmac_dvr_remove);
>  
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index eb6d9cd8e93f..5429531ae7c7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -711,14 +711,15 @@ int 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;
> -	int ret = stmmac_dvr_remove(&pdev->dev);
> +
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	if (plat->exit)
>  		plat->exit(pdev, plat->bsp_priv);
>  
>  	stmmac_remove_config_dt(pdev, plat);
>  
> -	return ret;
> +	return 0;
>  }
>  EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
>  
> 
> base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
> -- 
> 2.39.0
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
@ 2023-02-13 14:21   ` Larysa Zaremba
  0 siblings, 0 replies; 12+ messages in thread
From: Larysa Zaremba @ 2023-02-13 14:21 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev,
	linux-stm32, linux-arm-kernel, kernel

On Sat, Feb 11, 2023 at 12:24:30PM +0100, Uwe Kleine-König wrote:
> The function returns zero unconditionally. Change it to return void instead
> which simplifies some callers as error handing becomes unnecessary.
> 
> This also makes it more obvious that most platform remove callbacks always
> return zero.

Code in both patches looks OK.
Please, specify, which tree this patch should be in (net or net-next).
This is rather a code improvement than a fix, so net-next would be appropriate.

Also, multiple patches usually require a cover letter. The code changes are 
trivial, so maybe the best solution would be to just to squash those patches 
together.

> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 +---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c          | 5 +++--
>  drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c         | 5 +++--
>  drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c       | 5 +++--
>  drivers/net/ethernet/stmicro/stmmac/stmmac.h            | 2 +-
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c       | 4 +---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c   | 5 +++--
>  7 files changed, 15 insertions(+), 15 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 80efdeeb0b59..87a2c1a18638 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
> @@ -477,9 +477,7 @@ static int dwc_eth_dwmac_remove(struct platform_device *pdev)
>  
>  	data = device_get_match_data(&pdev->dev);
>  
> -	err = stmmac_dvr_remove(&pdev->dev);
> -	if (err < 0)
> -		dev_err(&pdev->dev, "failed to remove platform: %d\n", err);
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	err = data->remove(pdev);
>  	if (err < 0)
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> index 6656d76b6766..4b8fd11563e4 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> @@ -1915,11 +1915,12 @@ static int rk_gmac_probe(struct platform_device *pdev)
>  static int rk_gmac_remove(struct platform_device *pdev)
>  {
>  	struct rk_priv_data *bsp_priv = get_stmmac_bsp_priv(&pdev->dev);
> -	int ret = stmmac_dvr_remove(&pdev->dev);
> +
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	rk_gmac_powerdown(bsp_priv);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> index 710d7435733e..be3b1ebc06ab 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> @@ -371,11 +371,12 @@ static int sti_dwmac_probe(struct platform_device *pdev)
>  static int sti_dwmac_remove(struct platform_device *pdev)
>  {
>  	struct sti_dwmac *dwmac = get_stmmac_bsp_priv(&pdev->dev);
> -	int ret = stmmac_dvr_remove(&pdev->dev);
> +
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	clk_disable_unprepare(dwmac->clk);
>  
> -	return ret;
> +	return 0;
>  }
>  
>  #ifdef CONFIG_PM_SLEEP
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> index 2b38a499a404..0616b3a04ff3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> @@ -421,9 +421,10 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
>  {
>  	struct net_device *ndev = platform_get_drvdata(pdev);
>  	struct stmmac_priv *priv = netdev_priv(ndev);
> -	int ret = stmmac_dvr_remove(&pdev->dev);
>  	struct stm32_dwmac *dwmac = priv->plat->bsp_priv;
>  
> +	stmmac_dvr_remove(&pdev->dev);
> +
>  	stm32_dwmac_clk_disable(priv->plat->bsp_priv);
>  
>  	if (dwmac->irq_pwr_wakeup >= 0) {
> @@ -431,7 +432,7 @@ static int stm32_dwmac_remove(struct platform_device *pdev)
>  		device_init_wakeup(&pdev->dev, false);
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> index bdbf86cb102a..3d15e1e92e18 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> @@ -345,7 +345,7 @@ int stmmac_xdp_open(struct net_device *dev);
>  void stmmac_xdp_release(struct net_device *dev);
>  int stmmac_resume(struct device *dev);
>  int stmmac_suspend(struct device *dev);
> -int stmmac_dvr_remove(struct device *dev);
> +void stmmac_dvr_remove(struct device *dev);
>  int stmmac_dvr_probe(struct device *device,
>  		     struct plat_stmmacenet_data *plat_dat,
>  		     struct stmmac_resources *res);
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c6951c976f5d..97bcfb628463 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -7341,7 +7341,7 @@ EXPORT_SYMBOL_GPL(stmmac_dvr_probe);
>   * Description: this function resets the TX/RX processes, disables the MAC RX/TX
>   * changes the link status, releases the DMA descriptor rings.
>   */
> -int stmmac_dvr_remove(struct device *dev)
> +void stmmac_dvr_remove(struct device *dev)
>  {
>  	struct net_device *ndev = dev_get_drvdata(dev);
>  	struct stmmac_priv *priv = netdev_priv(ndev);
> @@ -7377,8 +7377,6 @@ int stmmac_dvr_remove(struct device *dev)
>  
>  	pm_runtime_disable(dev);
>  	pm_runtime_put_noidle(dev);
> -
> -	return 0;
>  }
>  EXPORT_SYMBOL_GPL(stmmac_dvr_remove);
>  
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index eb6d9cd8e93f..5429531ae7c7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -711,14 +711,15 @@ int 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;
> -	int ret = stmmac_dvr_remove(&pdev->dev);
> +
> +	stmmac_dvr_remove(&pdev->dev);
>  
>  	if (plat->exit)
>  		plat->exit(pdev, plat->bsp_priv);
>  
>  	stmmac_remove_config_dt(pdev, plat);
>  
> -	return ret;
> +	return 0;
>  }
>  EXPORT_SYMBOL_GPL(stmmac_pltfr_remove);
>  
> 
> base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
> -- 
> 2.39.0
> 

_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
  2023-02-13 14:21   ` Larysa Zaremba
@ 2023-02-13 16:23     ` Uwe Kleine-König
  -1 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-02-13 16:23 UTC (permalink / raw)
  To: Larysa Zaremba
  Cc: netdev, Alexandre Torgue, Jose Abreu, kernel, Giuseppe Cavallaro,
	linux-stm32, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

On Mon, Feb 13, 2023 at 03:21:27PM +0100, Larysa Zaremba wrote:
> On Sat, Feb 11, 2023 at 12:24:30PM +0100, Uwe Kleine-König wrote:
> > The function returns zero unconditionally. Change it to return void instead
> > which simplifies some callers as error handing becomes unnecessary.
> > 
> > This also makes it more obvious that most platform remove callbacks always
> > return zero.
> 
> Code in both patches looks OK.

Is this an Ack?

> Please, specify, which tree this patch should be in (net or net-next).
> This is rather a code improvement than a fix, so net-next would be appropriate.

net-next sounds fine. Sorry, I forgot about this requirement for net
patches.

> Also, multiple patches usually require a cover letter. The code changes are 
> trivial, so maybe the best solution would be to just to squash those patches 
> together.

My conclusion was a bit different: The code changes are trivial, so they
don't require a cover letter :-)

I don't care much about squashing the two patches together. I slightly
prefer to keep the changes as two changes as the changes are orthogonal
and one patch per thing is the usual action.

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] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
@ 2023-02-13 16:23     ` Uwe Kleine-König
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2023-02-13 16:23 UTC (permalink / raw)
  To: Larysa Zaremba
  Cc: netdev, Alexandre Torgue, Jose Abreu, kernel, Giuseppe Cavallaro,
	linux-stm32, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1349 bytes --]

On Mon, Feb 13, 2023 at 03:21:27PM +0100, Larysa Zaremba wrote:
> On Sat, Feb 11, 2023 at 12:24:30PM +0100, Uwe Kleine-König wrote:
> > The function returns zero unconditionally. Change it to return void instead
> > which simplifies some callers as error handing becomes unnecessary.
> > 
> > This also makes it more obvious that most platform remove callbacks always
> > return zero.
> 
> Code in both patches looks OK.

Is this an Ack?

> Please, specify, which tree this patch should be in (net or net-next).
> This is rather a code improvement than a fix, so net-next would be appropriate.

net-next sounds fine. Sorry, I forgot about this requirement for net
patches.

> Also, multiple patches usually require a cover letter. The code changes are 
> trivial, so maybe the best solution would be to just to squash those patches 
> together.

My conclusion was a bit different: The code changes are trivial, so they
don't require a cover letter :-)

I don't care much about squashing the two patches together. I slightly
prefer to keep the changes as two changes as the changes are orthogonal
and one patch per thing is the usual action.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
  2023-02-13 16:23     ` Uwe Kleine-König
@ 2023-02-14  1:36       ` Jakub Kicinski
  -1 siblings, 0 replies; 12+ messages in thread
From: Jakub Kicinski @ 2023-02-14  1:36 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Larysa Zaremba, netdev, Alexandre Torgue, Jose Abreu, kernel,
	Giuseppe Cavallaro, linux-stm32, linux-arm-kernel

On Mon, 13 Feb 2023 17:23:33 +0100 Uwe Kleine-König wrote:
> > Code in both patches looks OK.  
> 
> Is this an Ack?

FWIW we encourage folks on netdev who reviewed a patch to speak up,
even if they don't feel confident enough to send a persistent tag.

> > Also, multiple patches usually require a cover letter. The code changes are 
> > trivial, so maybe the best solution would be to just to squash those patches 
> > together.  
> 
> My conclusion was a bit different: The code changes are trivial, so they
> don't require a cover letter :-)
> 
> I don't care much about squashing the two patches together. I slightly
> prefer to keep the changes as two changes as the changes are orthogonal
> and one patch per thing is the usual action.

Fair enough, 2 patches are fine w/o a cover letter.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
@ 2023-02-14  1:36       ` Jakub Kicinski
  0 siblings, 0 replies; 12+ messages in thread
From: Jakub Kicinski @ 2023-02-14  1:36 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Larysa Zaremba, netdev, Alexandre Torgue, Jose Abreu, kernel,
	Giuseppe Cavallaro, linux-stm32, linux-arm-kernel

On Mon, 13 Feb 2023 17:23:33 +0100 Uwe Kleine-König wrote:
> > Code in both patches looks OK.  
> 
> Is this an Ack?

FWIW we encourage folks on netdev who reviewed a patch to speak up,
even if they don't feel confident enough to send a persistent tag.

> > Also, multiple patches usually require a cover letter. The code changes are 
> > trivial, so maybe the best solution would be to just to squash those patches 
> > together.  
> 
> My conclusion was a bit different: The code changes are trivial, so they
> don't require a cover letter :-)
> 
> I don't care much about squashing the two patches together. I slightly
> prefer to keep the changes as two changes as the changes are orthogonal
> and one patch per thing is the usual action.

Fair enough, 2 patches are fine w/o a cover letter.

_______________________________________________
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] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
  2023-02-11 11:24 ` Uwe Kleine-König
@ 2023-02-14  4:10   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 12+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-14  4:10 UTC (permalink / raw)
  To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=3Cu=2Ekleine-koenig=40pengutronix=2Ede=3E?=
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, netdev, linux-stm32,
	linux-arm-kernel, kernel

Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 11 Feb 2023 12:24:30 +0100 you wrote:
> The function returns zero unconditionally. Change it to return void instead
> which simplifies some callers as error handing becomes unnecessary.
> 
> This also makes it more obvious that most platform remove callbacks always
> return zero.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> [...]

Here is the summary with links:
  - [1/2] net: stmmac: Make stmmac_dvr_remove() return void
    https://git.kernel.org/netdev/net-next/c/ff0011cf5601
  - [2/2] net: stmmac: dwc-qos: Make struct dwc_eth_dwmac_data::remove return void
    https://git.kernel.org/netdev/net-next/c/1a940b00013a

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] 12+ messages in thread

* Re: [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void
@ 2023-02-14  4:10   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 12+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-14  4:10 UTC (permalink / raw)
  To: =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=3Cu=2Ekleine-koenig=40pengutronix=2Ede=3E?=
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, netdev, linux-stm32,
	linux-arm-kernel, kernel

Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 11 Feb 2023 12:24:30 +0100 you wrote:
> The function returns zero unconditionally. Change it to return void instead
> which simplifies some callers as error handing becomes unnecessary.
> 
> This also makes it more obvious that most platform remove callbacks always
> return zero.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> [...]

Here is the summary with links:
  - [1/2] net: stmmac: Make stmmac_dvr_remove() return void
    https://git.kernel.org/netdev/net-next/c/ff0011cf5601
  - [2/2] net: stmmac: dwc-qos: Make struct dwc_eth_dwmac_data::remove return void
    https://git.kernel.org/netdev/net-next/c/1a940b00013a

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] 12+ messages in thread

end of thread, other threads:[~2023-02-14  4:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-11 11:24 [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() return void Uwe Kleine-König
2023-02-11 11:24 ` Uwe Kleine-König
2023-02-11 11:24 ` [PATCH 2/2] net: stmmac: dwc-qos: Make struct dwc_eth_dwmac_data::remove " Uwe Kleine-König
2023-02-11 11:24   ` Uwe Kleine-König
2023-02-13 14:21 ` [PATCH 1/2] net: stmmac: Make stmmac_dvr_remove() " Larysa Zaremba
2023-02-13 14:21   ` Larysa Zaremba
2023-02-13 16:23   ` Uwe Kleine-König
2023-02-13 16:23     ` Uwe Kleine-König
2023-02-14  1:36     ` Jakub Kicinski
2023-02-14  1:36       ` Jakub Kicinski
2023-02-14  4:10 ` patchwork-bot+netdevbpf
2023-02-14  4:10   ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.