Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void
@ 2023-07-13  8:07 Yangtao Li
  2023-07-13  8:07 ` [PATCH 02/58] mmc: bcm2835: " Yangtao Li
                   ` (19 more replies)
  0 siblings, 20 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-sunxi, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sunxi-mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 69dcb8805e05..d3bd0ac99ec4 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sunxi_mmc_remove(struct platform_device *pdev)
+static void sunxi_mmc_remove(struct platform_device *pdev)
 {
 	struct mmc_host	*mmc = platform_get_drvdata(pdev);
 	struct sunxi_mmc_host *host = mmc_priv(mmc);
@@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device *pdev)
 	}
 	dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
 	mmc_free_host(mmc);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = {
 		.pm = &sunxi_mmc_pm_ops,
 	},
 	.probe		= sunxi_mmc_probe,
-	.remove		= sunxi_mmc_remove,
+	.remove_new	= sunxi_mmc_remove,
 };
 module_platform_driver(sunxi_mmc_driver);
 
-- 
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] 28+ messages in thread

* [PATCH 02/58] mmc: bcm2835: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-14 10:10   ` Florian Fainelli
  2023-07-13  8:07 ` [PATCH 05/58] mmc: mtk-sd: " Yangtao Li
                   ` (18 subsequent siblings)
  19 siblings, 1 reply; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/bcm2835.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index eea208856ce0..35d8fdea668b 100644
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -1431,7 +1431,7 @@ static int bcm2835_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int bcm2835_remove(struct platform_device *pdev)
+static void bcm2835_remove(struct platform_device *pdev)
 {
 	struct bcm2835_host *host = platform_get_drvdata(pdev);
 	struct mmc_host *mmc = mmc_from_priv(host);
@@ -1449,8 +1449,6 @@ static int bcm2835_remove(struct platform_device *pdev)
 		dma_release_channel(host->dma_chan_rxtx);
 
 	mmc_free_host(mmc);
-
-	return 0;
 }
 
 static const struct of_device_id bcm2835_match[] = {
@@ -1461,7 +1459,7 @@ MODULE_DEVICE_TABLE(of, bcm2835_match);
 
 static struct platform_driver bcm2835_driver = {
 	.probe      = bcm2835_probe,
-	.remove     = bcm2835_remove,
+	.remove_new = bcm2835_remove,
 	.driver     = {
 		.name		= "sdhost-bcm2835",
 		.probe_type	= PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 05/58] mmc: mtk-sd: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
  2023-07-13  8:07 ` [PATCH 02/58] mmc: bcm2835: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 10/58] mmc: sdhci: milbeaut: " Yangtao Li
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Chaotian Jing, Ulf Hansson, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-kernel,
	linux-arm-kernel, linux-mediatek

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/mtk-sd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 02403ff99e0d..9e2debd1edbe 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2887,7 +2887,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int msdc_drv_remove(struct platform_device *pdev)
+static void msdc_drv_remove(struct platform_device *pdev)
 {
 	struct mmc_host *mmc;
 	struct msdc_host *host;
@@ -2911,8 +2911,6 @@ static int msdc_drv_remove(struct platform_device *pdev)
 			host->dma.bd, host->dma.bd_addr);
 
 	mmc_free_host(mmc);
-
-	return 0;
 }
 
 static void msdc_save_reg(struct msdc_host *host)
@@ -3054,7 +3052,7 @@ static const struct dev_pm_ops msdc_dev_pm_ops = {
 
 static struct platform_driver mt_msdc_driver = {
 	.probe = msdc_drv_probe,
-	.remove = msdc_drv_remove,
+	.remove_new = msdc_drv_remove,
 	.driver = {
 		.name = "mtk-msdc",
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 10/58] mmc: sdhci: milbeaut: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
  2023-07-13  8:07 ` [PATCH 02/58] mmc: bcm2835: " Yangtao Li
  2023-07-13  8:07 ` [PATCH 05/58] mmc: mtk-sd: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 12/58] mmc: sdhci-of-at91: " Yangtao Li
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Adrian Hunter, Ulf Hansson, Taichi Sugaya, Takao Orito
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-milbeaut.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c
index 148b37ac6564..ee4514c90eea 100644
--- a/drivers/mmc/host/sdhci-milbeaut.c
+++ b/drivers/mmc/host/sdhci-milbeaut.c
@@ -313,7 +313,7 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sdhci_milbeaut_remove(struct platform_device *pdev)
+static void sdhci_milbeaut_remove(struct platform_device *pdev)
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct f_sdhost_priv *priv = sdhci_priv(host);
@@ -326,8 +326,6 @@ static int sdhci_milbeaut_remove(struct platform_device *pdev)
 
 	sdhci_free_host(host);
 	platform_set_drvdata(pdev, NULL);
-
-	return 0;
 }
 
 static struct platform_driver sdhci_milbeaut_driver = {
@@ -337,7 +335,7 @@ static struct platform_driver sdhci_milbeaut_driver = {
 		.of_match_table = of_match_ptr(mlb_dt_ids),
 	},
 	.probe	= sdhci_milbeaut_probe,
-	.remove	= sdhci_milbeaut_remove,
+	.remove_new = sdhci_milbeaut_remove,
 };
 
 module_platform_driver(sdhci_milbeaut_driver);
-- 
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] 28+ messages in thread

* [PATCH 12/58] mmc: sdhci-of-at91: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (2 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 10/58] mmc: sdhci: milbeaut: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 14/58] mmc: dw_mmc: exynos: " Yangtao Li
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Adrian Hunter, Eugen Hristev, Ulf Hansson, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-of-at91.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
index cd0134580a90..af5bc0caf29b 100644
--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -443,7 +443,7 @@ static int sdhci_at91_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sdhci_at91_remove(struct platform_device *pdev)
+static void sdhci_at91_remove(struct platform_device *pdev)
 {
 	struct sdhci_host	*host = platform_get_drvdata(pdev);
 	struct sdhci_pltfm_host	*pltfm_host = sdhci_priv(host);
@@ -461,8 +461,6 @@ static int sdhci_at91_remove(struct platform_device *pdev)
 	clk_disable_unprepare(gck);
 	clk_disable_unprepare(hclock);
 	clk_disable_unprepare(mainck);
-
-	return 0;
 }
 
 static struct platform_driver sdhci_at91_driver = {
@@ -473,7 +471,7 @@ static struct platform_driver sdhci_at91_driver = {
 		.pm	= &sdhci_at91_dev_pm_ops,
 	},
 	.probe		= sdhci_at91_probe,
-	.remove		= sdhci_at91_remove,
+	.remove_new	= sdhci_at91_remove,
 };
 
 module_platform_driver(sdhci_at91_driver);
-- 
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] 28+ messages in thread

* [PATCH 14/58] mmc: dw_mmc: exynos: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (3 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 12/58] mmc: sdhci-of-at91: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:11   ` Krzysztof Kozlowski
  2023-07-13  8:07 ` [PATCH 18/58] mmc: meson-gx: " Yangtao Li
                   ` (14 subsequent siblings)
  19 siblings, 1 reply; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Jaehoon Chung, Ulf Hansson, Krzysztof Kozlowski, Alim Akhtar
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/dw_mmc-exynos.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 9f20ac524c8b..698408e8bad0 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -664,15 +664,13 @@ static int dw_mci_exynos_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int dw_mci_exynos_remove(struct platform_device *pdev)
+static void dw_mci_exynos_remove(struct platform_device *pdev)
 {
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_set_suspended(&pdev->dev);
 	pm_runtime_put_noidle(&pdev->dev);
 
 	dw_mci_pltfm_remove(pdev);
-
-	return 0;
 }
 
 static const struct dev_pm_ops dw_mci_exynos_pmops = {
@@ -685,7 +683,7 @@ static const struct dev_pm_ops dw_mci_exynos_pmops = {
 
 static struct platform_driver dw_mci_exynos_pltfm_driver = {
 	.probe		= dw_mci_exynos_probe,
-	.remove		= dw_mci_exynos_remove,
+	.remove_new	= dw_mci_exynos_remove,
 	.driver		= {
 		.name		= "dwmmc_exynos",
 		.probe_type	= PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 18/58] mmc: meson-gx: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (4 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 14/58] mmc: dw_mmc: exynos: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 21/58] mmc: meson-mx-sdhc: " Yangtao Li
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-amlogic, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/meson-gx-mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index ee9a25b900ae..106ebc1fd36f 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1297,7 +1297,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_mmc_remove(struct platform_device *pdev)
+static void meson_mmc_remove(struct platform_device *pdev)
 {
 	struct meson_host *host = dev_get_drvdata(&pdev->dev);
 
@@ -1308,8 +1308,6 @@ static int meson_mmc_remove(struct platform_device *pdev)
 	free_irq(host->irq, host);
 
 	clk_disable_unprepare(host->mmc_clk);
-
-	return 0;
 }
 
 static const struct meson_mmc_data meson_gx_data = {
@@ -1340,7 +1338,7 @@ MODULE_DEVICE_TABLE(of, meson_mmc_of_match);
 
 static struct platform_driver meson_mmc_driver = {
 	.probe		= meson_mmc_probe,
-	.remove		= meson_mmc_remove,
+	.remove_new	= meson_mmc_remove,
 	.driver		= {
 		.name = DRIVER_NAME,
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 21/58] mmc: meson-mx-sdhc: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (5 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 18/58] mmc: meson-gx: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 23/58] mmc: mxs-mmc: " Yangtao Li
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-amlogic, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/meson-mx-sdhc-mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/meson-mx-sdhc-mmc.c b/drivers/mmc/host/meson-mx-sdhc-mmc.c
index 97168cdfa8e9..528ec8166e7c 100644
--- a/drivers/mmc/host/meson-mx-sdhc-mmc.c
+++ b/drivers/mmc/host/meson-mx-sdhc-mmc.c
@@ -880,7 +880,7 @@ static int meson_mx_sdhc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_mx_sdhc_remove(struct platform_device *pdev)
+static void meson_mx_sdhc_remove(struct platform_device *pdev)
 {
 	struct meson_mx_sdhc_host *host = platform_get_drvdata(pdev);
 
@@ -889,8 +889,6 @@ static int meson_mx_sdhc_remove(struct platform_device *pdev)
 	meson_mx_sdhc_disable_clks(host->mmc);
 
 	clk_disable_unprepare(host->pclk);
-
-	return 0;
 }
 
 static const struct meson_mx_sdhc_data meson_mx_sdhc_data_meson8 = {
@@ -925,7 +923,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_sdhc_of_match);
 
 static struct platform_driver meson_mx_sdhc_driver = {
 	.probe   = meson_mx_sdhc_probe,
-	.remove  = meson_mx_sdhc_remove,
+	.remove_new = meson_mx_sdhc_remove,
 	.driver  = {
 		.name = "meson-mx-sdhc",
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 23/58] mmc: mxs-mmc: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (6 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 21/58] mmc: meson-mx-sdhc: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 25/58] mmc: uniphier-sd: " Yangtao Li
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/mxs-mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 8c3655d3be96..9abfb169464b 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -674,7 +674,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mxs_mmc_remove(struct platform_device *pdev)
+static void mxs_mmc_remove(struct platform_device *pdev)
 {
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct mxs_mmc_host *host = mmc_priv(mmc);
@@ -688,8 +688,6 @@ static int mxs_mmc_remove(struct platform_device *pdev)
 	clk_disable_unprepare(ssp->clk);
 
 	mmc_free_host(mmc);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -717,7 +715,7 @@ static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume);
 
 static struct platform_driver mxs_mmc_driver = {
 	.probe		= mxs_mmc_probe,
-	.remove		= mxs_mmc_remove,
+	.remove_new	= mxs_mmc_remove,
 	.driver		= {
 		.name	= DRIVER_NAME,
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 25/58]  mmc: uniphier-sd: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (7 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 23/58] mmc: mxs-mmc: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  9:09   ` Uwe Kleine-König
  2023-07-13  8:07 ` [PATCH 27/58] mmc: sdhci-of-arasan: " Yangtao Li
                   ` (10 subsequent siblings)
  19 siblings, 1 reply; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Kunihiko Hayashi, Masami Hiramatsu
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/uniphier-sd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 61acd69fac0e..33a4d1c6ef04 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -727,15 +727,13 @@ static int uniphier_sd_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int uniphier_sd_remove(struct platform_device *pdev)
+static void uniphier_sd_remove(struct platform_device *pdev)
 {
 	struct tmio_mmc_host *host = platform_get_drvdata(pdev);
 
 	tmio_mmc_host_remove(host);
 	uniphier_sd_clk_disable(host);
 	tmio_mmc_host_free(host);
-
-	return 0;
 }
 
 static const struct of_device_id uniphier_sd_match[] = {
@@ -757,7 +755,7 @@ MODULE_DEVICE_TABLE(of, uniphier_sd_match);
 
 static struct platform_driver uniphier_sd_driver = {
 	.probe = uniphier_sd_probe,
-	.remove = uniphier_sd_remove,
+	.remove_new = uniphier_sd_remove,
 	.driver = {
 		.name = "uniphier-sd",
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 27/58] mmc: sdhci-of-arasan: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (8 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 25/58] mmc: uniphier-sd: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 34/58] mmc: sdhci-of-aspeed: " Yangtao Li
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Michal Simek, Adrian Hunter, Ulf Hansson
  Cc: Yangtao Li, Uwe Kleine-König, linux-arm-kernel, linux-mmc,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-of-arasan.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 294dd605fd2b..160bab0c437c 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -2016,7 +2016,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sdhci_arasan_remove(struct platform_device *pdev)
+static void sdhci_arasan_remove(struct platform_device *pdev)
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -2034,8 +2034,6 @@ static int sdhci_arasan_remove(struct platform_device *pdev)
 	sdhci_pltfm_unregister(pdev);
 
 	clk_disable_unprepare(clk_ahb);
-
-	return 0;
 }
 
 static struct platform_driver sdhci_arasan_driver = {
@@ -2046,7 +2044,7 @@ static struct platform_driver sdhci_arasan_driver = {
 		.pm = &sdhci_arasan_dev_pm_ops,
 	},
 	.probe = sdhci_arasan_probe,
-	.remove = sdhci_arasan_remove,
+	.remove_new = sdhci_arasan_remove,
 };
 
 module_platform_driver(sdhci_arasan_driver);
-- 
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] 28+ messages in thread

* [PATCH 34/58] mmc: sdhci-of-aspeed: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (9 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 27/58] mmc: sdhci-of-arasan: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  9:13   ` Uwe Kleine-König
  2023-07-13  8:07 ` [PATCH 35/58] mmc: meson-mx-sdio: " Yangtao Li
                   ` (8 subsequent siblings)
  19 siblings, 1 reply; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Andrew Jeffery, Adrian Hunter, Ulf Hansson, Joel Stanley
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-aspeed,
	openbmc, linux-arm-kernel, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-of-aspeed.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
index 25b4073f698b..42d54532cabe 100644
--- a/drivers/mmc/host/sdhci-of-aspeed.c
+++ b/drivers/mmc/host/sdhci-of-aspeed.c
@@ -450,22 +450,19 @@ static int aspeed_sdhci_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int aspeed_sdhci_remove(struct platform_device *pdev)
+static void aspeed_sdhci_remove(struct platform_device *pdev)
 {
 	struct sdhci_pltfm_host *pltfm_host;
 	struct sdhci_host *host;
-	int dead = 0;
 
 	host = platform_get_drvdata(pdev);
 	pltfm_host = sdhci_priv(host);
 
-	sdhci_remove_host(host, dead);
+	sdhci_remove_host(host, 0);
 
 	clk_disable_unprepare(pltfm_host->clk);
 
 	sdhci_pltfm_free(pdev);
-
-	return 0;
 }
 
 static const struct aspeed_sdhci_pdata ast2400_sdhci_pdata = {
@@ -521,7 +518,7 @@ static struct platform_driver aspeed_sdhci_driver = {
 		.of_match_table = aspeed_sdhci_of_match,
 	},
 	.probe		= aspeed_sdhci_probe,
-	.remove		= aspeed_sdhci_remove,
+	.remove_new	= aspeed_sdhci_remove,
 };
 
 static int aspeed_sdc_probe(struct platform_device *pdev)
@@ -574,13 +571,11 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int aspeed_sdc_remove(struct platform_device *pdev)
+static void aspeed_sdc_remove(struct platform_device *pdev)
 {
 	struct aspeed_sdc *sdc = dev_get_drvdata(&pdev->dev);
 
 	clk_disable_unprepare(sdc->clk);
-
-	return 0;
 }
 
 static const struct of_device_id aspeed_sdc_of_match[] = {
@@ -600,7 +595,7 @@ static struct platform_driver aspeed_sdc_driver = {
 		.of_match_table = aspeed_sdc_of_match,
 	},
 	.probe		= aspeed_sdc_probe,
-	.remove		= aspeed_sdc_remove,
+	.remove_new	= aspeed_sdc_remove,
 };
 
 #if defined(CONFIG_MMC_SDHCI_OF_ASPEED_TEST)
-- 
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] 28+ messages in thread

* [PATCH 35/58] mmc: meson-mx-sdio: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (10 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 34/58] mmc: sdhci-of-aspeed: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 39/58] mmc: sdhci-esdhc-imx: " Yangtao Li
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-amlogic, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/meson-mx-sdio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index 3a19a05ef55a..a11577f2ee69 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -728,7 +728,7 @@ static int meson_mx_mmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int meson_mx_mmc_remove(struct platform_device *pdev)
+static void meson_mx_mmc_remove(struct platform_device *pdev)
 {
 	struct meson_mx_mmc_host *host = platform_get_drvdata(pdev);
 	struct device *slot_dev = mmc_dev(host->mmc);
@@ -743,8 +743,6 @@ static int meson_mx_mmc_remove(struct platform_device *pdev)
 	clk_disable_unprepare(host->core_clk);
 
 	mmc_free_host(host->mmc);
-
-	return 0;
 }
 
 static const struct of_device_id meson_mx_mmc_of_match[] = {
@@ -756,7 +754,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_mmc_of_match);
 
 static struct platform_driver meson_mx_mmc_driver = {
 	.probe   = meson_mx_mmc_probe,
-	.remove  = meson_mx_mmc_remove,
+	.remove_new = meson_mx_mmc_remove,
 	.driver  = {
 		.name = "meson-mx-sdio",
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 39/58] mmc: sdhci-esdhc-imx: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (11 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 35/58] mmc: meson-mx-sdio: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 42/58] mmc: dw_mmc: rockchip: " Yangtao Li
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Adrian Hunter, Haibo Chen, Ulf Hansson, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index eebf94604a7f..e882067366da 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1802,7 +1802,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 	return err;
 }
 
-static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
+static void sdhci_esdhc_imx_remove(struct platform_device *pdev)
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1824,8 +1824,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
 		cpu_latency_qos_remove_request(&imx_data->pm_qos_req);
 
 	sdhci_pltfm_free(pdev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -1986,7 +1984,7 @@ static struct platform_driver sdhci_esdhc_imx_driver = {
 		.pm	= &sdhci_esdhc_pmops,
 	},
 	.probe		= sdhci_esdhc_imx_probe,
-	.remove		= sdhci_esdhc_imx_remove,
+	.remove_new	= sdhci_esdhc_imx_remove,
 };
 
 module_platform_driver(sdhci_esdhc_imx_driver);
-- 
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] 28+ messages in thread

* [PATCH 42/58] mmc: dw_mmc: rockchip: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (12 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 39/58] mmc: sdhci-esdhc-imx: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 43/58] mmc: owl: " Yangtao Li
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Jaehoon Chung, Ulf Hansson, Heiko Stuebner
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-rockchip, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/dw_mmc-rockchip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index 2a99f15f527f..b07190ba4b7a 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -371,15 +371,13 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int dw_mci_rockchip_remove(struct platform_device *pdev)
+static void dw_mci_rockchip_remove(struct platform_device *pdev)
 {
 	pm_runtime_get_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_put_noidle(&pdev->dev);
 
 	dw_mci_pltfm_remove(pdev);
-
-	return 0;
 }
 
 static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
@@ -392,7 +390,7 @@ static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
 
 static struct platform_driver dw_mci_rockchip_pltfm_driver = {
 	.probe		= dw_mci_rockchip_probe,
-	.remove		= dw_mci_rockchip_remove,
+	.remove_new	= dw_mci_rockchip_remove,
 	.driver		= {
 		.name		= "dwmmc_rockchip",
 		.probe_type	= PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 43/58] mmc: owl: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (13 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 42/58] mmc: dw_mmc: rockchip: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 46/58] mmc: atmel-mci: " Yangtao Li
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson, Andreas Färber, Manivannan Sadhasivam
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-actions, linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/owl-mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c
index 1bf22b08b373..a13bec42554a 100644
--- a/drivers/mmc/host/owl-mmc.c
+++ b/drivers/mmc/host/owl-mmc.c
@@ -667,7 +667,7 @@ static int owl_mmc_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int owl_mmc_remove(struct platform_device *pdev)
+static void owl_mmc_remove(struct platform_device *pdev)
 {
 	struct mmc_host	*mmc = platform_get_drvdata(pdev);
 	struct owl_mmc_host *owl_host = mmc_priv(mmc);
@@ -676,8 +676,6 @@ static int owl_mmc_remove(struct platform_device *pdev)
 	disable_irq(owl_host->irq);
 	dma_release_channel(owl_host->dma);
 	mmc_free_host(mmc);
-
-	return 0;
 }
 
 static const struct of_device_id owl_mmc_of_match[] = {
@@ -693,7 +691,7 @@ static struct platform_driver owl_mmc_driver = {
 		.of_match_table = owl_mmc_of_match,
 	},
 	.probe		= owl_mmc_probe,
-	.remove		= owl_mmc_remove,
+	.remove_new	= owl_mmc_remove,
 };
 module_platform_driver(owl_mmc_driver);
 
-- 
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] 28+ messages in thread

* [PATCH 46/58] mmc: atmel-mci: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (14 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 43/58] mmc: owl: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 47/58] mmc: sdhci-st: " Yangtao Li
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ludovic Desroches, Ulf Hansson, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/atmel-mci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index dd18440a90c5..b4ae9aa939a5 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -2600,7 +2600,7 @@ static int atmci_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int atmci_remove(struct platform_device *pdev)
+static void atmci_remove(struct platform_device *pdev)
 {
 	struct atmel_mci	*host = platform_get_drvdata(pdev);
 	unsigned int		i;
@@ -2630,8 +2630,6 @@ static int atmci_remove(struct platform_device *pdev)
 
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_put_noidle(&pdev->dev);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -2664,7 +2662,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = {
 
 static struct platform_driver atmci_driver = {
 	.probe		= atmci_probe,
-	.remove		= atmci_remove,
+	.remove_new	= atmci_remove,
 	.driver		= {
 		.name		= "atmel_mci",
 		.probe_type	= PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 47/58] mmc: sdhci-st: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (15 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 46/58] mmc: atmel-mci: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:07 ` [PATCH 48/58] mmc: wmt-sdmmc: " Yangtao Li
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Patrice Chotard, Adrian Hunter, Ulf Hansson
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-st.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
index 6415916fbd91..d955b5f4b7e9 100644
--- a/drivers/mmc/host/sdhci-st.c
+++ b/drivers/mmc/host/sdhci-st.c
@@ -434,7 +434,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int sdhci_st_remove(struct platform_device *pdev)
+static void sdhci_st_remove(struct platform_device *pdev)
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -446,8 +446,6 @@ static int sdhci_st_remove(struct platform_device *pdev)
 	clk_disable_unprepare(pdata->icnclk);
 
 	reset_control_assert(rstc);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -510,7 +508,7 @@ MODULE_DEVICE_TABLE(of, st_sdhci_match);
 
 static struct platform_driver sdhci_st_driver = {
 	.probe = sdhci_st_probe,
-	.remove = sdhci_st_remove,
+	.remove_new = sdhci_st_remove,
 	.driver = {
 		   .name = "sdhci-st",
 		   .probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 48/58] mmc: wmt-sdmmc: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (16 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 47/58] mmc: sdhci-st: " Yangtao Li
@ 2023-07-13  8:07 ` Yangtao Li
  2023-07-13  8:08 ` [PATCH 58/58] mmc: " Yangtao Li
  2023-07-13 15:13 ` [PATCH 01/58] mmc: sunxi: " Jernej Škrabec
  19 siblings, 0 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:07 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Yangtao Li, Uwe Kleine-König, linux-arm-kernel, linux-mmc,
	linux-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/wmt-sdmmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 68525d900046..74c475d071b7 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -880,7 +880,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int wmt_mci_remove(struct platform_device *pdev)
+static void wmt_mci_remove(struct platform_device *pdev)
 {
 	struct mmc_host *mmc;
 	struct wmt_mci_priv *priv;
@@ -918,8 +918,6 @@ static int wmt_mci_remove(struct platform_device *pdev)
 	mmc_free_host(mmc);
 
 	dev_info(&pdev->dev, "WMT MCI device removed\n");
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
@@ -989,7 +987,7 @@ static const struct dev_pm_ops wmt_mci_pm = {
 
 static struct platform_driver wmt_mci_driver = {
 	.probe = wmt_mci_probe,
-	.remove = wmt_mci_remove,
+	.remove_new = wmt_mci_remove,
 	.driver = {
 		.name = DRIVER_NAME,
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-- 
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] 28+ messages in thread

* [PATCH 58/58] mmc: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (17 preceding siblings ...)
  2023-07-13  8:07 ` [PATCH 48/58] mmc: wmt-sdmmc: " Yangtao Li
@ 2023-07-13  8:08 ` Yangtao Li
  2023-07-14  7:49   ` Adrian Hunter
  2023-07-14 10:12   ` Florian Fainelli
  2023-07-13 15:13 ` [PATCH 01/58] mmc: sunxi: " Jernej Škrabec
  19 siblings, 2 replies; 28+ messages in thread
From: Yangtao Li @ 2023-07-13  8:08 UTC (permalink / raw)
  To: Adrian Hunter, Ulf Hansson, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list, Kamal Dasu,
	Al Cooper, Lars Povlsen, Steen Hegelund, Daniel Machon,
	UNGLinuxDriver
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-kernel,
	linux-arm-kernel

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.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mmc/host/sdhci-bcm-kona.c  | 2 +-
 drivers/mmc/host/sdhci-brcmstb.c   | 2 +-
 drivers/mmc/host/sdhci-cadence.c   | 2 +-
 drivers/mmc/host/sdhci-dove.c      | 2 +-
 drivers/mmc/host/sdhci-iproc.c     | 2 +-
 drivers/mmc/host/sdhci-of-esdhc.c  | 2 +-
 drivers/mmc/host/sdhci-of-hlwd.c   | 2 +-
 drivers/mmc/host/sdhci-of-sparx5.c | 2 +-
 drivers/mmc/host/sdhci-pltfm.c     | 4 +---
 drivers/mmc/host/sdhci-pltfm.h     | 2 +-
 drivers/mmc/host/sdhci-pxav2.c     | 2 +-
 11 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
index 6a93a54fe067..2e3736603853 100644
--- a/drivers/mmc/host/sdhci-bcm-kona.c
+++ b/drivers/mmc/host/sdhci-bcm-kona.c
@@ -319,7 +319,7 @@ static struct platform_driver sdhci_bcm_kona_driver = {
 		.of_match_table = sdhci_bcm_kona_of_match,
 	},
 	.probe		= sdhci_bcm_kona_probe,
-	.remove		= sdhci_pltfm_unregister,
+	.remove_new	= sdhci_pltfm_unregister,
 };
 module_platform_driver(sdhci_bcm_kona_driver);
 
diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
index 4c22337199cf..a2b6d8f2eeb6 100644
--- a/drivers/mmc/host/sdhci-brcmstb.c
+++ b/drivers/mmc/host/sdhci-brcmstb.c
@@ -430,7 +430,7 @@ static struct platform_driver sdhci_brcmstb_driver = {
 		.of_match_table = of_match_ptr(sdhci_brcm_of_match),
 	},
 	.probe		= sdhci_brcmstb_probe,
-	.remove		= sdhci_pltfm_unregister,
+	.remove_new	= sdhci_pltfm_unregister,
 	.shutdown	= sdhci_brcmstb_shutdown,
 };
 
diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
index d2f625054689..1702a499b36a 100644
--- a/drivers/mmc/host/sdhci-cadence.c
+++ b/drivers/mmc/host/sdhci-cadence.c
@@ -617,7 +617,7 @@ static struct platform_driver sdhci_cdns_driver = {
 		.of_match_table = sdhci_cdns_match,
 	},
 	.probe = sdhci_cdns_probe,
-	.remove = sdhci_pltfm_unregister,
+	.remove_new = sdhci_pltfm_unregister,
 };
 module_platform_driver(sdhci_cdns_driver);
 
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 5e5bf82e5976..75335dbf223c 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -110,7 +110,7 @@ static struct platform_driver sdhci_dove_driver = {
 		.of_match_table = sdhci_dove_of_match_table,
 	},
 	.probe		= sdhci_dove_probe,
-	.remove		= sdhci_pltfm_unregister,
+	.remove_new	= sdhci_pltfm_unregister,
 };
 
 module_platform_driver(sdhci_dove_driver);
diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 86eb0045515e..0dbebcecd8fc 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -432,7 +432,7 @@ static struct platform_driver sdhci_iproc_driver = {
 		.pm = &sdhci_pltfm_pmops,
 	},
 	.probe = sdhci_iproc_probe,
-	.remove = sdhci_pltfm_unregister,
+	.remove_new = sdhci_pltfm_unregister,
 	.shutdown = sdhci_iproc_shutdown,
 };
 module_platform_driver(sdhci_iproc_driver);
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 48ca1cf15b19..5072b59f6165 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = {
 		.pm = &esdhc_of_dev_pm_ops,
 	},
 	.probe = sdhci_esdhc_probe,
-	.remove = sdhci_pltfm_unregister,
+	.remove_new = sdhci_pltfm_unregister,
 };
 
 module_platform_driver(sdhci_esdhc_driver);
diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c
index 12675797b296..cba3ba48e9dc 100644
--- a/drivers/mmc/host/sdhci-of-hlwd.c
+++ b/drivers/mmc/host/sdhci-of-hlwd.c
@@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = {
 		.pm = &sdhci_pltfm_pmops,
 	},
 	.probe = sdhci_hlwd_probe,
-	.remove = sdhci_pltfm_unregister,
+	.remove_new = sdhci_pltfm_unregister,
 };
 
 module_platform_driver(sdhci_hlwd_driver);
diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c
index 28e4ee69e100..26aaab068e00 100644
--- a/drivers/mmc/host/sdhci-of-sparx5.c
+++ b/drivers/mmc/host/sdhci-of-sparx5.c
@@ -260,7 +260,7 @@ static struct platform_driver sdhci_sparx5_driver = {
 		.pm = &sdhci_pltfm_pmops,
 	},
 	.probe = sdhci_sparx5_probe,
-	.remove = sdhci_pltfm_unregister,
+	.remove_new = sdhci_pltfm_unregister,
 };
 
 module_platform_driver(sdhci_sparx5_driver);
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 673e750a8490..72d07b49b0a3 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -187,7 +187,7 @@ int sdhci_pltfm_register(struct platform_device *pdev,
 }
 EXPORT_SYMBOL_GPL(sdhci_pltfm_register);
 
-int sdhci_pltfm_unregister(struct platform_device *pdev)
+void sdhci_pltfm_unregister(struct platform_device *pdev)
 {
 	struct sdhci_host *host = platform_get_drvdata(pdev);
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -196,8 +196,6 @@ int sdhci_pltfm_unregister(struct platform_device *pdev)
 	sdhci_remove_host(host, dead);
 	clk_disable_unprepare(pltfm_host->clk);
 	sdhci_pltfm_free(pdev);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister);
 
diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
index 9bd717ff784b..6e6a443dafd9 100644
--- a/drivers/mmc/host/sdhci-pltfm.h
+++ b/drivers/mmc/host/sdhci-pltfm.h
@@ -102,7 +102,7 @@ extern void sdhci_pltfm_free(struct platform_device *pdev);
 extern int sdhci_pltfm_register(struct platform_device *pdev,
 				const struct sdhci_pltfm_data *pdata,
 				size_t priv_size);
-extern int sdhci_pltfm_unregister(struct platform_device *pdev);
+extern void sdhci_pltfm_unregister(struct platform_device *pdev);
 
 extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);
 
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
index 91aca8f8d6ef..1c1e763ce209 100644
--- a/drivers/mmc/host/sdhci-pxav2.c
+++ b/drivers/mmc/host/sdhci-pxav2.c
@@ -359,7 +359,7 @@ static struct platform_driver sdhci_pxav2_driver = {
 		.pm	= &sdhci_pltfm_pmops,
 	},
 	.probe		= sdhci_pxav2_probe,
-	.remove		= sdhci_pltfm_unregister,
+	.remove_new	= sdhci_pltfm_unregister,
 };
 
 module_platform_driver(sdhci_pxav2_driver);
-- 
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] 28+ messages in thread

* Re: [PATCH 14/58] mmc: dw_mmc: exynos: Convert to platform remove callback returning void
  2023-07-13  8:07 ` [PATCH 14/58] mmc: dw_mmc: exynos: " Yangtao Li
@ 2023-07-13  8:11   ` Krzysztof Kozlowski
  2023-07-13  9:02     ` Uwe Kleine-König
  0 siblings, 1 reply; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-13  8:11 UTC (permalink / raw)
  To: Yangtao Li, Jaehoon Chung, Ulf Hansson, Alim Akhtar
  Cc: Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On 13/07/2023 10:07, Yangtao Li 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
> 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.

You even copied Uwe's commit msg... Aren't you duplicate his work or is
it being coordinated?

Best regards,
Krzysztof


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

* Re: [PATCH 14/58] mmc: dw_mmc: exynos: Convert to platform remove callback returning void
  2023-07-13  8:11   ` Krzysztof Kozlowski
@ 2023-07-13  9:02     ` Uwe Kleine-König
  0 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2023-07-13  9:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Yangtao Li, Jaehoon Chung, Ulf Hansson, Alim Akhtar, linux-mmc,
	linux-arm-kernel, linux-samsung-soc, linux-kernel


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

On Thu, Jul 13, 2023 at 10:11:15AM +0200, Krzysztof Kozlowski wrote:
> On 13/07/2023 10:07, Yangtao Li 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
> > 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.
> 
> You even copied Uwe's commit msg... Aren't you duplicate his work or is
> it being coordinated?

We communicated and I politely asked to not interfer. This series is
just what Yangtao had still pending. That's fine for me.

Thanks for noticing,
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] 28+ messages in thread

* Re: [PATCH 25/58]  mmc: uniphier-sd: Convert to platform remove callback returning void
  2023-07-13  8:07 ` [PATCH 25/58] mmc: uniphier-sd: " Yangtao Li
@ 2023-07-13  9:09   ` Uwe Kleine-König
  0 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2023-07-13  9:09 UTC (permalink / raw)
  To: Yangtao Li
  Cc: Ulf Hansson, Kunihiko Hayashi, Masami Hiramatsu, linux-mmc,
	linux-arm-kernel, linux-kernel


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

Hello,

$Subject ~= s/  / /

(maybe that's fixed automatically if picked up by git-am, but I'm not
sure and didn't test.)

Otherwise looks fine.

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

* Re: [PATCH 34/58] mmc: sdhci-of-aspeed: Convert to platform remove callback returning void
  2023-07-13  8:07 ` [PATCH 34/58] mmc: sdhci-of-aspeed: " Yangtao Li
@ 2023-07-13  9:13   ` Uwe Kleine-König
  0 siblings, 0 replies; 28+ messages in thread
From: Uwe Kleine-König @ 2023-07-13  9:13 UTC (permalink / raw)
  To: Yangtao Li
  Cc: Andrew Jeffery, Adrian Hunter, Ulf Hansson, Joel Stanley,
	linux-mmc, linux-aspeed, openbmc, linux-arm-kernel, linux-kernel


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

On Thu, Jul 13, 2023 at 04:07:43PM +0800, Yangtao Li 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
> 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.
> 
> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/mmc/host/sdhci-of-aspeed.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c
> index 25b4073f698b..42d54532cabe 100644
> --- a/drivers/mmc/host/sdhci-of-aspeed.c
> +++ b/drivers/mmc/host/sdhci-of-aspeed.c
> @@ -450,22 +450,19 @@ static int aspeed_sdhci_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int aspeed_sdhci_remove(struct platform_device *pdev)
> +static void aspeed_sdhci_remove(struct platform_device *pdev)
>  {
>  	struct sdhci_pltfm_host *pltfm_host;
>  	struct sdhci_host *host;
> -	int dead = 0;
>  
>  	host = platform_get_drvdata(pdev);
>  	pltfm_host = sdhci_priv(host);
>  
> -	sdhci_remove_host(host, dead);
> +	sdhci_remove_host(host, 0);

Please mention additional cleanups in the commit log (or split them into
separate patches).

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

* Re: [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void
  2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
                   ` (18 preceding siblings ...)
  2023-07-13  8:08 ` [PATCH 58/58] mmc: " Yangtao Li
@ 2023-07-13 15:13 ` Jernej Škrabec
  19 siblings, 0 replies; 28+ messages in thread
From: Jernej Škrabec @ 2023-07-13 15:13 UTC (permalink / raw)
  To: Ulf Hansson, Chen-Yu Tsai, Samuel Holland, Yangtao Li
  Cc: Yangtao Li, Uwe Kleine-König, linux-mmc, linux-arm-kernel,
	linux-sunxi, linux-kernel

Dne četrtek, 13. julij 2023 ob 10:07:10 CEST je Yangtao Li napisal(a):
> 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.
> 
> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/mmc/host/sunxi-mmc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 69dcb8805e05..d3bd0ac99ec4 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1486,7 +1486,7 @@ static int sunxi_mmc_probe(struct platform_device
> *pdev) return ret;
>  }
> 
> -static int sunxi_mmc_remove(struct platform_device *pdev)
> +static void sunxi_mmc_remove(struct platform_device *pdev)
>  {
>  	struct mmc_host	*mmc = platform_get_drvdata(pdev);
>  	struct sunxi_mmc_host *host = mmc_priv(mmc);
> @@ -1499,8 +1499,6 @@ static int sunxi_mmc_remove(struct platform_device
> *pdev) }
>  	dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host-
>sg_dma);
>  	mmc_free_host(mmc);
> -
> -	return 0;
>  }
> 
>  #ifdef CONFIG_PM
> @@ -1556,7 +1554,7 @@ static struct platform_driver sunxi_mmc_driver = {
>  		.pm = &sunxi_mmc_pm_ops,
>  	},
>  	.probe		= sunxi_mmc_probe,
> -	.remove		= sunxi_mmc_remove,
> +	.remove_new	= sunxi_mmc_remove,
>  };
>  module_platform_driver(sunxi_mmc_driver);





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

* Re: [PATCH 58/58] mmc: Convert to platform remove callback returning void
  2023-07-13  8:08 ` [PATCH 58/58] mmc: " Yangtao Li
@ 2023-07-14  7:49   ` Adrian Hunter
  2023-07-14 10:12   ` Florian Fainelli
  1 sibling, 0 replies; 28+ messages in thread
From: Adrian Hunter @ 2023-07-14  7:49 UTC (permalink / raw)
  To: Yangtao Li, Ulf Hansson, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Kamal Dasu, Al Cooper,
	Lars Povlsen, Steen Hegelund, Daniel Machon, UNGLinuxDriver
  Cc: Uwe Kleine-König, linux-mmc, linux-kernel, linux-arm-kernel

On 13/07/23 11:08, Yangtao Li 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
> 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.
> 
> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/mmc/host/sdhci-bcm-kona.c  | 2 +-
>  drivers/mmc/host/sdhci-brcmstb.c   | 2 +-
>  drivers/mmc/host/sdhci-cadence.c   | 2 +-
>  drivers/mmc/host/sdhci-dove.c      | 2 +-
>  drivers/mmc/host/sdhci-iproc.c     | 2 +-
>  drivers/mmc/host/sdhci-of-esdhc.c  | 2 +-
>  drivers/mmc/host/sdhci-of-hlwd.c   | 2 +-
>  drivers/mmc/host/sdhci-of-sparx5.c | 2 +-
>  drivers/mmc/host/sdhci-pltfm.c     | 4 +---
>  drivers/mmc/host/sdhci-pltfm.h     | 2 +-
>  drivers/mmc/host/sdhci-pxav2.c     | 2 +-

Looks like drivers/mmc/host/sdhci-npcm.c was missed

>  11 files changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c
> index 6a93a54fe067..2e3736603853 100644
> --- a/drivers/mmc/host/sdhci-bcm-kona.c
> +++ b/drivers/mmc/host/sdhci-bcm-kona.c
> @@ -319,7 +319,7 @@ static struct platform_driver sdhci_bcm_kona_driver = {
>  		.of_match_table = sdhci_bcm_kona_of_match,
>  	},
>  	.probe		= sdhci_bcm_kona_probe,
> -	.remove		= sdhci_pltfm_unregister,
> +	.remove_new	= sdhci_pltfm_unregister,
>  };
>  module_platform_driver(sdhci_bcm_kona_driver);
>  
> diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c
> index 4c22337199cf..a2b6d8f2eeb6 100644
> --- a/drivers/mmc/host/sdhci-brcmstb.c
> +++ b/drivers/mmc/host/sdhci-brcmstb.c
> @@ -430,7 +430,7 @@ static struct platform_driver sdhci_brcmstb_driver = {
>  		.of_match_table = of_match_ptr(sdhci_brcm_of_match),
>  	},
>  	.probe		= sdhci_brcmstb_probe,
> -	.remove		= sdhci_pltfm_unregister,
> +	.remove_new	= sdhci_pltfm_unregister,
>  	.shutdown	= sdhci_brcmstb_shutdown,
>  };
>  
> diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
> index d2f625054689..1702a499b36a 100644
> --- a/drivers/mmc/host/sdhci-cadence.c
> +++ b/drivers/mmc/host/sdhci-cadence.c
> @@ -617,7 +617,7 @@ static struct platform_driver sdhci_cdns_driver = {
>  		.of_match_table = sdhci_cdns_match,
>  	},
>  	.probe = sdhci_cdns_probe,
> -	.remove = sdhci_pltfm_unregister,
> +	.remove_new = sdhci_pltfm_unregister,
>  };
>  module_platform_driver(sdhci_cdns_driver);
>  
> diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
> index 5e5bf82e5976..75335dbf223c 100644
> --- a/drivers/mmc/host/sdhci-dove.c
> +++ b/drivers/mmc/host/sdhci-dove.c
> @@ -110,7 +110,7 @@ static struct platform_driver sdhci_dove_driver = {
>  		.of_match_table = sdhci_dove_of_match_table,
>  	},
>  	.probe		= sdhci_dove_probe,
> -	.remove		= sdhci_pltfm_unregister,
> +	.remove_new	= sdhci_pltfm_unregister,
>  };
>  
>  module_platform_driver(sdhci_dove_driver);
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 86eb0045515e..0dbebcecd8fc 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -432,7 +432,7 @@ static struct platform_driver sdhci_iproc_driver = {
>  		.pm = &sdhci_pltfm_pmops,
>  	},
>  	.probe = sdhci_iproc_probe,
> -	.remove = sdhci_pltfm_unregister,
> +	.remove_new = sdhci_pltfm_unregister,
>  	.shutdown = sdhci_iproc_shutdown,
>  };
>  module_platform_driver(sdhci_iproc_driver);
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index 48ca1cf15b19..5072b59f6165 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = {
>  		.pm = &esdhc_of_dev_pm_ops,
>  	},
>  	.probe = sdhci_esdhc_probe,
> -	.remove = sdhci_pltfm_unregister,
> +	.remove_new = sdhci_pltfm_unregister,
>  };
>  
>  module_platform_driver(sdhci_esdhc_driver);
> diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c
> index 12675797b296..cba3ba48e9dc 100644
> --- a/drivers/mmc/host/sdhci-of-hlwd.c
> +++ b/drivers/mmc/host/sdhci-of-hlwd.c
> @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = {
>  		.pm = &sdhci_pltfm_pmops,
>  	},
>  	.probe = sdhci_hlwd_probe,
> -	.remove = sdhci_pltfm_unregister,
> +	.remove_new = sdhci_pltfm_unregister,
>  };
>  
>  module_platform_driver(sdhci_hlwd_driver);
> diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c
> index 28e4ee69e100..26aaab068e00 100644
> --- a/drivers/mmc/host/sdhci-of-sparx5.c
> +++ b/drivers/mmc/host/sdhci-of-sparx5.c
> @@ -260,7 +260,7 @@ static struct platform_driver sdhci_sparx5_driver = {
>  		.pm = &sdhci_pltfm_pmops,
>  	},
>  	.probe = sdhci_sparx5_probe,
> -	.remove = sdhci_pltfm_unregister,
> +	.remove_new = sdhci_pltfm_unregister,
>  };
>  
>  module_platform_driver(sdhci_sparx5_driver);
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 673e750a8490..72d07b49b0a3 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -187,7 +187,7 @@ int sdhci_pltfm_register(struct platform_device *pdev,
>  }
>  EXPORT_SYMBOL_GPL(sdhci_pltfm_register);
>  
> -int sdhci_pltfm_unregister(struct platform_device *pdev)
> +void sdhci_pltfm_unregister(struct platform_device *pdev)
>  {
>  	struct sdhci_host *host = platform_get_drvdata(pdev);
>  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -196,8 +196,6 @@ int sdhci_pltfm_unregister(struct platform_device *pdev)
>  	sdhci_remove_host(host, dead);
>  	clk_disable_unprepare(pltfm_host->clk);
>  	sdhci_pltfm_free(pdev);
> -
> -	return 0;
>  }
>  EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister);
>  
> diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
> index 9bd717ff784b..6e6a443dafd9 100644
> --- a/drivers/mmc/host/sdhci-pltfm.h
> +++ b/drivers/mmc/host/sdhci-pltfm.h
> @@ -102,7 +102,7 @@ extern void sdhci_pltfm_free(struct platform_device *pdev);
>  extern int sdhci_pltfm_register(struct platform_device *pdev,
>  				const struct sdhci_pltfm_data *pdata,
>  				size_t priv_size);
> -extern int sdhci_pltfm_unregister(struct platform_device *pdev);
> +extern void sdhci_pltfm_unregister(struct platform_device *pdev);
>  
>  extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);
>  
> diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c
> index 91aca8f8d6ef..1c1e763ce209 100644
> --- a/drivers/mmc/host/sdhci-pxav2.c
> +++ b/drivers/mmc/host/sdhci-pxav2.c
> @@ -359,7 +359,7 @@ static struct platform_driver sdhci_pxav2_driver = {
>  		.pm	= &sdhci_pltfm_pmops,
>  	},
>  	.probe		= sdhci_pxav2_probe,
> -	.remove		= sdhci_pltfm_unregister,
> +	.remove_new	= sdhci_pltfm_unregister,
>  };
>  
>  module_platform_driver(sdhci_pxav2_driver);


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

* Re: [PATCH 02/58] mmc: bcm2835: Convert to platform remove callback returning void
  2023-07-13  8:07 ` [PATCH 02/58] mmc: bcm2835: " Yangtao Li
@ 2023-07-14 10:10   ` Florian Fainelli
  0 siblings, 0 replies; 28+ messages in thread
From: Florian Fainelli @ 2023-07-14 10:10 UTC (permalink / raw)
  To: Yangtao Li, Ulf Hansson, Ray Jui, Scott Branden,
	Broadcom internal kernel review list
  Cc: Uwe Kleine-König, linux-mmc, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel


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



On 7/13/2023 10:07 AM, Yangtao Li 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
> 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.
> 
> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 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] 28+ messages in thread

* Re: [PATCH 58/58] mmc: Convert to platform remove callback returning void
  2023-07-13  8:08 ` [PATCH 58/58] mmc: " Yangtao Li
  2023-07-14  7:49   ` Adrian Hunter
@ 2023-07-14 10:12   ` Florian Fainelli
  1 sibling, 0 replies; 28+ messages in thread
From: Florian Fainelli @ 2023-07-14 10:12 UTC (permalink / raw)
  To: Yangtao Li, Adrian Hunter, Ulf Hansson, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Kamal Dasu, Al Cooper,
	Lars Povlsen, Steen Hegelund, Daniel Machon, UNGLinuxDriver
  Cc: Uwe Kleine-König, linux-mmc, linux-kernel, linux-arm-kernel


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



On 7/13/2023 10:08 AM, Yangtao Li 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
> 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.
> 
> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>   drivers/mmc/host/sdhci-bcm-kona.c  | 2 +-
>   drivers/mmc/host/sdhci-brcmstb.c   | 2 +-

Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> # Broadcom 
drivers
-- 
Florian

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 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] 28+ messages in thread

end of thread, other threads:[~2023-07-14 10:13 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13  8:07 [PATCH 01/58] mmc: sunxi: Convert to platform remove callback returning void Yangtao Li
2023-07-13  8:07 ` [PATCH 02/58] mmc: bcm2835: " Yangtao Li
2023-07-14 10:10   ` Florian Fainelli
2023-07-13  8:07 ` [PATCH 05/58] mmc: mtk-sd: " Yangtao Li
2023-07-13  8:07 ` [PATCH 10/58] mmc: sdhci: milbeaut: " Yangtao Li
2023-07-13  8:07 ` [PATCH 12/58] mmc: sdhci-of-at91: " Yangtao Li
2023-07-13  8:07 ` [PATCH 14/58] mmc: dw_mmc: exynos: " Yangtao Li
2023-07-13  8:11   ` Krzysztof Kozlowski
2023-07-13  9:02     ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 18/58] mmc: meson-gx: " Yangtao Li
2023-07-13  8:07 ` [PATCH 21/58] mmc: meson-mx-sdhc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 23/58] mmc: mxs-mmc: " Yangtao Li
2023-07-13  8:07 ` [PATCH 25/58] mmc: uniphier-sd: " Yangtao Li
2023-07-13  9:09   ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 27/58] mmc: sdhci-of-arasan: " Yangtao Li
2023-07-13  8:07 ` [PATCH 34/58] mmc: sdhci-of-aspeed: " Yangtao Li
2023-07-13  9:13   ` Uwe Kleine-König
2023-07-13  8:07 ` [PATCH 35/58] mmc: meson-mx-sdio: " Yangtao Li
2023-07-13  8:07 ` [PATCH 39/58] mmc: sdhci-esdhc-imx: " Yangtao Li
2023-07-13  8:07 ` [PATCH 42/58] mmc: dw_mmc: rockchip: " Yangtao Li
2023-07-13  8:07 ` [PATCH 43/58] mmc: owl: " Yangtao Li
2023-07-13  8:07 ` [PATCH 46/58] mmc: atmel-mci: " Yangtao Li
2023-07-13  8:07 ` [PATCH 47/58] mmc: sdhci-st: " Yangtao Li
2023-07-13  8:07 ` [PATCH 48/58] mmc: wmt-sdmmc: " Yangtao Li
2023-07-13  8:08 ` [PATCH 58/58] mmc: " Yangtao Li
2023-07-14  7:49   ` Adrian Hunter
2023-07-14 10:12   ` Florian Fainelli
2023-07-13 15:13 ` [PATCH 01/58] mmc: sunxi: " Jernej Škrabec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox