All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-09-28  7:06 ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Mun Yew Tham, Andy Shevchenko, linux-gpio, linux-kernel,
	Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

Hello,

this series converts all platform drivers below drivers/gpio to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

There are no interdependencies between the patches. As there are still
quite a few drivers to convert, I'm happy about every patch that makes
it in. So even if there is a merge conflict with one patch until you
apply or a subject prefix is suboptimal, please apply the remainder of
this series anyhow.

Best regards
Uwe

Uwe Kleine-König (23):
  gpio: altera: Convert to platform remove callback returning void
  gpio: amdpt: Convert to platform remove callback returning void
  gpio: brcmstb: Convert to platform remove callback returning void
  gpio: cadence: Convert to platform remove callback returning void
  gpio: dln2: Convert to platform remove callback returning void
  gpio: ftgpio010: Convert to platform remove callback returning void
  gpio: grgpio: Convert to platform remove callback returning void
  gpio: ljca: Convert to platform remove callback returning void
  gpio: lpc18xx: Convert to platform remove callback returning void
  gpio: mb86s7x: Convert to platform remove callback returning void
  gpio: mm-lantiq: Convert to platform remove callback returning void
  gpio: mpc5200: Convert to platform remove callback returning void
  gpio: mpc8xxx: Convert to platform remove callback returning void
  gpio: omap: Convert to platform remove callback returning void
  gpio: rcar: Convert to platform remove callback returning void
  gpio: rockchip: Convert to platform remove callback returning void
  gpio: tb10x: Convert to platform remove callback returning void
  gpio: ts5500: Convert to platform remove callback returning void
  gpio: uniphier: Convert to platform remove callback returning void
  gpio: xgene-sb: Convert to platform remove callback returning void
  gpio: xgs-iproc: Convert to platform remove callback returning void
  gpio: xilinx: Convert to platform remove callback returning void
  gpio: zynq: Convert to platform remove callback returning void

 drivers/gpio/gpio-altera.c    | 6 ++----
 drivers/gpio/gpio-amdpt.c     | 6 ++----
 drivers/gpio/gpio-brcmstb.c   | 6 ++----
 drivers/gpio/gpio-cadence.c   | 6 ++----
 drivers/gpio/gpio-dln2.c      | 6 ++----
 drivers/gpio/gpio-ftgpio010.c | 6 ++----
 drivers/gpio/gpio-grgpio.c    | 6 ++----
 drivers/gpio/gpio-ljca.c      | 5 ++---
 drivers/gpio/gpio-lpc18xx.c   | 6 ++----
 drivers/gpio/gpio-mb86s7x.c   | 6 ++----
 drivers/gpio/gpio-mm-lantiq.c | 6 ++----
 drivers/gpio/gpio-mpc5200.c   | 8 +++-----
 drivers/gpio/gpio-mpc8xxx.c   | 6 ++----
 drivers/gpio/gpio-omap.c      | 6 ++----
 drivers/gpio/gpio-rcar.c      | 5 ++---
 drivers/gpio/gpio-rockchip.c  | 6 ++----
 drivers/gpio/gpio-tb10x.c     | 6 ++----
 drivers/gpio/gpio-ts5500.c    | 6 ++----
 drivers/gpio/gpio-uniphier.c  | 6 ++----
 drivers/gpio/gpio-xgene-sb.c  | 6 ++----
 drivers/gpio/gpio-xgs-iproc.c | 6 ++----
 drivers/gpio/gpio-xilinx.c    | 6 ++----
 drivers/gpio/gpio-zynq.c      | 5 ++---
 23 files changed, 47 insertions(+), 90 deletions(-)


base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3
-- 
2.40.1


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

* [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-09-28  7:06 ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Mun Yew Tham, Andy Shevchenko, linux-gpio, linux-kernel,
	Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

Hello,

this series converts all platform drivers below drivers/gpio to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

There are no interdependencies between the patches. As there are still
quite a few drivers to convert, I'm happy about every patch that makes
it in. So even if there is a merge conflict with one patch until you
apply or a subject prefix is suboptimal, please apply the remainder of
this series anyhow.

Best regards
Uwe

Uwe Kleine-König (23):
  gpio: altera: Convert to platform remove callback returning void
  gpio: amdpt: Convert to platform remove callback returning void
  gpio: brcmstb: Convert to platform remove callback returning void
  gpio: cadence: Convert to platform remove callback returning void
  gpio: dln2: Convert to platform remove callback returning void
  gpio: ftgpio010: Convert to platform remove callback returning void
  gpio: grgpio: Convert to platform remove callback returning void
  gpio: ljca: Convert to platform remove callback returning void
  gpio: lpc18xx: Convert to platform remove callback returning void
  gpio: mb86s7x: Convert to platform remove callback returning void
  gpio: mm-lantiq: Convert to platform remove callback returning void
  gpio: mpc5200: Convert to platform remove callback returning void
  gpio: mpc8xxx: Convert to platform remove callback returning void
  gpio: omap: Convert to platform remove callback returning void
  gpio: rcar: Convert to platform remove callback returning void
  gpio: rockchip: Convert to platform remove callback returning void
  gpio: tb10x: Convert to platform remove callback returning void
  gpio: ts5500: Convert to platform remove callback returning void
  gpio: uniphier: Convert to platform remove callback returning void
  gpio: xgene-sb: Convert to platform remove callback returning void
  gpio: xgs-iproc: Convert to platform remove callback returning void
  gpio: xilinx: Convert to platform remove callback returning void
  gpio: zynq: Convert to platform remove callback returning void

 drivers/gpio/gpio-altera.c    | 6 ++----
 drivers/gpio/gpio-amdpt.c     | 6 ++----
 drivers/gpio/gpio-brcmstb.c   | 6 ++----
 drivers/gpio/gpio-cadence.c   | 6 ++----
 drivers/gpio/gpio-dln2.c      | 6 ++----
 drivers/gpio/gpio-ftgpio010.c | 6 ++----
 drivers/gpio/gpio-grgpio.c    | 6 ++----
 drivers/gpio/gpio-ljca.c      | 5 ++---
 drivers/gpio/gpio-lpc18xx.c   | 6 ++----
 drivers/gpio/gpio-mb86s7x.c   | 6 ++----
 drivers/gpio/gpio-mm-lantiq.c | 6 ++----
 drivers/gpio/gpio-mpc5200.c   | 8 +++-----
 drivers/gpio/gpio-mpc8xxx.c   | 6 ++----
 drivers/gpio/gpio-omap.c      | 6 ++----
 drivers/gpio/gpio-rcar.c      | 5 ++---
 drivers/gpio/gpio-rockchip.c  | 6 ++----
 drivers/gpio/gpio-tb10x.c     | 6 ++----
 drivers/gpio/gpio-ts5500.c    | 6 ++----
 drivers/gpio/gpio-uniphier.c  | 6 ++----
 drivers/gpio/gpio-xgene-sb.c  | 6 ++----
 drivers/gpio/gpio-xgs-iproc.c | 6 ++----
 drivers/gpio/gpio-xilinx.c    | 6 ++----
 drivers/gpio/gpio-zynq.c      | 5 ++---
 23 files changed, 47 insertions(+), 90 deletions(-)


base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3
-- 
2.40.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-09-28  7:06 ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Mun Yew Tham, Andy Shevchenko, linux-gpio, linux-kernel,
	Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

Hello,

this series converts all platform drivers below drivers/gpio to use
.remove_new(). The motivation is to get rid of an integer return code
that is (mostly) ignored by the platform driver core and error prone on
the driver side.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

There are no interdependencies between the patches. As there are still
quite a few drivers to convert, I'm happy about every patch that makes
it in. So even if there is a merge conflict with one patch until you
apply or a subject prefix is suboptimal, please apply the remainder of
this series anyhow.

Best regards
Uwe

Uwe Kleine-König (23):
  gpio: altera: Convert to platform remove callback returning void
  gpio: amdpt: Convert to platform remove callback returning void
  gpio: brcmstb: Convert to platform remove callback returning void
  gpio: cadence: Convert to platform remove callback returning void
  gpio: dln2: Convert to platform remove callback returning void
  gpio: ftgpio010: Convert to platform remove callback returning void
  gpio: grgpio: Convert to platform remove callback returning void
  gpio: ljca: Convert to platform remove callback returning void
  gpio: lpc18xx: Convert to platform remove callback returning void
  gpio: mb86s7x: Convert to platform remove callback returning void
  gpio: mm-lantiq: Convert to platform remove callback returning void
  gpio: mpc5200: Convert to platform remove callback returning void
  gpio: mpc8xxx: Convert to platform remove callback returning void
  gpio: omap: Convert to platform remove callback returning void
  gpio: rcar: Convert to platform remove callback returning void
  gpio: rockchip: Convert to platform remove callback returning void
  gpio: tb10x: Convert to platform remove callback returning void
  gpio: ts5500: Convert to platform remove callback returning void
  gpio: uniphier: Convert to platform remove callback returning void
  gpio: xgene-sb: Convert to platform remove callback returning void
  gpio: xgs-iproc: Convert to platform remove callback returning void
  gpio: xilinx: Convert to platform remove callback returning void
  gpio: zynq: Convert to platform remove callback returning void

 drivers/gpio/gpio-altera.c    | 6 ++----
 drivers/gpio/gpio-amdpt.c     | 6 ++----
 drivers/gpio/gpio-brcmstb.c   | 6 ++----
 drivers/gpio/gpio-cadence.c   | 6 ++----
 drivers/gpio/gpio-dln2.c      | 6 ++----
 drivers/gpio/gpio-ftgpio010.c | 6 ++----
 drivers/gpio/gpio-grgpio.c    | 6 ++----
 drivers/gpio/gpio-ljca.c      | 5 ++---
 drivers/gpio/gpio-lpc18xx.c   | 6 ++----
 drivers/gpio/gpio-mb86s7x.c   | 6 ++----
 drivers/gpio/gpio-mm-lantiq.c | 6 ++----
 drivers/gpio/gpio-mpc5200.c   | 8 +++-----
 drivers/gpio/gpio-mpc8xxx.c   | 6 ++----
 drivers/gpio/gpio-omap.c      | 6 ++----
 drivers/gpio/gpio-rcar.c      | 5 ++---
 drivers/gpio/gpio-rockchip.c  | 6 ++----
 drivers/gpio/gpio-tb10x.c     | 6 ++----
 drivers/gpio/gpio-ts5500.c    | 6 ++----
 drivers/gpio/gpio-uniphier.c  | 6 ++----
 drivers/gpio/gpio-xgene-sb.c  | 6 ++----
 drivers/gpio/gpio-xgs-iproc.c | 6 ++----
 drivers/gpio/gpio-xilinx.c    | 6 ++----
 drivers/gpio/gpio-zynq.c      | 5 ++---
 23 files changed, 47 insertions(+), 90 deletions(-)


base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 01/23] gpio: altera: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
  (?)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Mun Yew Tham, Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-altera.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 54d7c450c596..c2edfbb231fc 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -317,13 +317,11 @@ static int altera_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int altera_gpio_remove(struct platform_device *pdev)
+static void altera_gpio_remove(struct platform_device *pdev)
 {
 	struct altera_gpio_chip *altera_gc = platform_get_drvdata(pdev);
 
 	of_mm_gpiochip_remove(&altera_gc->mmchip);
-
-	return 0;
 }
 
 static const struct of_device_id altera_gpio_of_match[] = {
@@ -338,7 +336,7 @@ static struct platform_driver altera_gpio_driver = {
 		.of_match_table = altera_gpio_of_match,
 	},
 	.probe		= altera_gpio_probe,
-	.remove		= altera_gpio_remove,
+	.remove_new	= altera_gpio_remove,
 };
 
 static int __init altera_gpio_init(void)
-- 
2.40.1


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

* [PATCH 02/23] gpio: amdpt: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (2 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-amdpt.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
index 07c6d090058d..0a2ea9db4682 100644
--- a/drivers/gpio/gpio-amdpt.c
+++ b/drivers/gpio/gpio-amdpt.c
@@ -122,13 +122,11 @@ static int pt_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int pt_gpio_remove(struct platform_device *pdev)
+static void pt_gpio_remove(struct platform_device *pdev)
 {
 	struct pt_gpio_chip *pt_gpio = platform_get_drvdata(pdev);
 
 	gpiochip_remove(&pt_gpio->gc);
-
-	return 0;
 }
 
 static const struct acpi_device_id pt_gpio_acpi_match[] = {
@@ -145,7 +143,7 @@ static struct platform_driver pt_gpio_driver = {
 		.acpi_match_table = ACPI_PTR(pt_gpio_acpi_match),
 	},
 	.probe = pt_gpio_probe,
-	.remove = pt_gpio_remove,
+	.remove_new = pt_gpio_remove,
 };
 
 module_platform_driver(pt_gpio_driver);
-- 
2.40.1


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

* [PATCH 03/23] gpio: brcmstb: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
@ 2023-09-28  7:06   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andy Shevchenko,
	linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-brcmstb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index bccdbfd5ec80..a789af4a5c85 100644
--- a/drivers/gpio/gpio-brcmstb.c
+++ b/drivers/gpio/gpio-brcmstb.c
@@ -371,7 +371,7 @@ static int brcmstb_gpio_sanity_check_banks(struct device *dev,
 	}
 }
 
-static int brcmstb_gpio_remove(struct platform_device *pdev)
+static void brcmstb_gpio_remove(struct platform_device *pdev)
 {
 	struct brcmstb_gpio_priv *priv = platform_get_drvdata(pdev);
 	struct brcmstb_gpio_bank *bank;
@@ -395,8 +395,6 @@ static int brcmstb_gpio_remove(struct platform_device *pdev)
 	 */
 	list_for_each_entry(bank, &priv->bank_list, node)
 		gpiochip_remove(&bank->gc);
-
-	return 0;
 }
 
 static int brcmstb_gpio_of_xlate(struct gpio_chip *gc,
@@ -757,7 +755,7 @@ static struct platform_driver brcmstb_gpio_driver = {
 		.pm = &brcmstb_gpio_pm_ops,
 	},
 	.probe = brcmstb_gpio_probe,
-	.remove = brcmstb_gpio_remove,
+	.remove_new = brcmstb_gpio_remove,
 	.shutdown = brcmstb_gpio_shutdown,
 };
 module_platform_driver(brcmstb_gpio_driver);
-- 
2.40.1


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

* [PATCH 03/23] gpio: brcmstb: Convert to platform remove callback returning void
@ 2023-09-28  7:06   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, Andy Shevchenko,
	linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-brcmstb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c
index bccdbfd5ec80..a789af4a5c85 100644
--- a/drivers/gpio/gpio-brcmstb.c
+++ b/drivers/gpio/gpio-brcmstb.c
@@ -371,7 +371,7 @@ static int brcmstb_gpio_sanity_check_banks(struct device *dev,
 	}
 }
 
-static int brcmstb_gpio_remove(struct platform_device *pdev)
+static void brcmstb_gpio_remove(struct platform_device *pdev)
 {
 	struct brcmstb_gpio_priv *priv = platform_get_drvdata(pdev);
 	struct brcmstb_gpio_bank *bank;
@@ -395,8 +395,6 @@ static int brcmstb_gpio_remove(struct platform_device *pdev)
 	 */
 	list_for_each_entry(bank, &priv->bank_list, node)
 		gpiochip_remove(&bank->gc);
-
-	return 0;
 }
 
 static int brcmstb_gpio_of_xlate(struct gpio_chip *gc,
@@ -757,7 +755,7 @@ static struct platform_driver brcmstb_gpio_driver = {
 		.pm = &brcmstb_gpio_pm_ops,
 	},
 	.probe = brcmstb_gpio_probe,
-	.remove = brcmstb_gpio_remove,
+	.remove_new = brcmstb_gpio_remove,
 	.shutdown = brcmstb_gpio_shutdown,
 };
 module_platform_driver(brcmstb_gpio_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/23] gpio: cadence: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (4 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-cadence.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-cadence.c b/drivers/gpio/gpio-cadence.c
index 3720b90cad10..6a439cf78459 100644
--- a/drivers/gpio/gpio-cadence.c
+++ b/drivers/gpio/gpio-cadence.c
@@ -268,14 +268,12 @@ static int cdns_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cdns_gpio_remove(struct platform_device *pdev)
+static void cdns_gpio_remove(struct platform_device *pdev)
 {
 	struct cdns_gpio_chip *cgpio = platform_get_drvdata(pdev);
 
 	iowrite32(cgpio->bypass_orig, cgpio->regs + CDNS_GPIO_BYPASS_MODE);
 	clk_disable_unprepare(cgpio->pclk);
-
-	return 0;
 }
 
 static const struct of_device_id cdns_of_ids[] = {
@@ -290,7 +288,7 @@ static struct platform_driver cdns_gpio_driver = {
 		.of_match_table = cdns_of_ids,
 	},
 	.probe = cdns_gpio_probe,
-	.remove = cdns_gpio_remove,
+	.remove_new = cdns_gpio_remove,
 };
 module_platform_driver(cdns_gpio_driver);
 
-- 
2.40.1


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

* [PATCH 05/23] gpio: dln2: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (5 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-dln2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-dln2.c b/drivers/gpio/gpio-dln2.c
index 71fa437b491f..7ead1f51128a 100644
--- a/drivers/gpio/gpio-dln2.c
+++ b/drivers/gpio/gpio-dln2.c
@@ -504,17 +504,15 @@ static int dln2_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int dln2_gpio_remove(struct platform_device *pdev)
+static void dln2_gpio_remove(struct platform_device *pdev)
 {
 	dln2_unregister_event_cb(pdev, DLN2_GPIO_CONDITION_MET_EV);
-
-	return 0;
 }
 
 static struct platform_driver dln2_gpio_driver = {
 	.driver.name	= "dln2-gpio",
 	.probe		= dln2_gpio_probe,
-	.remove		= dln2_gpio_remove,
+	.remove_new	= dln2_gpio_remove,
 };
 
 module_platform_driver(dln2_gpio_driver);
-- 
2.40.1


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

* [PATCH 06/23] gpio: ftgpio010: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (6 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-ftgpio010.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c
index 5ce59dcf02e3..97d345b59352 100644
--- a/drivers/gpio/gpio-ftgpio010.c
+++ b/drivers/gpio/gpio-ftgpio010.c
@@ -324,13 +324,11 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ftgpio_gpio_remove(struct platform_device *pdev)
+static void ftgpio_gpio_remove(struct platform_device *pdev)
 {
 	struct ftgpio_gpio *g = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(g->clk);
-
-	return 0;
 }
 
 static const struct of_device_id ftgpio_gpio_of_match[] = {
@@ -352,6 +350,6 @@ static struct platform_driver ftgpio_gpio_driver = {
 		.of_match_table = ftgpio_gpio_of_match,
 	},
 	.probe = ftgpio_gpio_probe,
-	.remove = ftgpio_gpio_remove,
+	.remove_new = ftgpio_gpio_remove,
 };
 builtin_platform_driver(ftgpio_gpio_driver);
-- 
2.40.1


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

* [PATCH 07/23] gpio: grgpio: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (7 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-grgpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c
index 0163c95f6dd7..017c7170eb57 100644
--- a/drivers/gpio/gpio-grgpio.c
+++ b/drivers/gpio/gpio-grgpio.c
@@ -431,7 +431,7 @@ static int grgpio_probe(struct platform_device *ofdev)
 	return 0;
 }
 
-static int grgpio_remove(struct platform_device *ofdev)
+static void grgpio_remove(struct platform_device *ofdev)
 {
 	struct grgpio_priv *priv = platform_get_drvdata(ofdev);
 
@@ -439,8 +439,6 @@ static int grgpio_remove(struct platform_device *ofdev)
 
 	if (priv->domain)
 		irq_domain_remove(priv->domain);
-
-	return 0;
 }
 
 static const struct of_device_id grgpio_match[] = {
@@ -457,7 +455,7 @@ static struct platform_driver grgpio_driver = {
 		.of_match_table = grgpio_match,
 	},
 	.probe = grgpio_probe,
-	.remove = grgpio_remove,
+	.remove_new = grgpio_remove,
 };
 module_platform_driver(grgpio_driver);
 
-- 
2.40.1


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

* [PATCH 08/23] gpio: ljca: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (8 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-ljca.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-ljca.c b/drivers/gpio/gpio-ljca.c
index 87863f0230f5..aca69329455f 100644
--- a/drivers/gpio/gpio-ljca.c
+++ b/drivers/gpio/gpio-ljca.c
@@ -421,7 +421,7 @@ static int ljca_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int ljca_gpio_remove(struct platform_device *pdev)
+static void ljca_gpio_remove(struct platform_device *pdev)
 {
 	struct ljca_gpio_dev *ljca_gpio = platform_get_drvdata(pdev);
 
@@ -429,7 +429,6 @@ static int ljca_gpio_remove(struct platform_device *pdev)
 	ljca_unregister_event_cb(ljca_gpio->gpio_info->ljca);
 	mutex_destroy(&ljca_gpio->irq_lock);
 	mutex_destroy(&ljca_gpio->trans_lock);
-	return 0;
 }
 
 #define LJCA_GPIO_DRV_NAME "ljca-gpio"
@@ -442,7 +441,7 @@ MODULE_DEVICE_TABLE(platform, ljca_gpio_id);
 static struct platform_driver ljca_gpio_driver = {
 	.driver.name = LJCA_GPIO_DRV_NAME,
 	.probe = ljca_gpio_probe,
-	.remove = ljca_gpio_remove,
+	.remove_new = ljca_gpio_remove,
 };
 module_platform_driver(ljca_gpio_driver);
 
-- 
2.40.1


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

* [PATCH 09/23] gpio: lpc18xx: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
@ 2023-09-28  7:06   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Vladimir Zapolskiy, linux-gpio,
	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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-lpc18xx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c
index ed3f653a1dfc..5c6bb57a8c99 100644
--- a/drivers/gpio/gpio-lpc18xx.c
+++ b/drivers/gpio/gpio-lpc18xx.c
@@ -381,7 +381,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int lpc18xx_gpio_remove(struct platform_device *pdev)
+static void lpc18xx_gpio_remove(struct platform_device *pdev)
 {
 	struct lpc18xx_gpio_chip *gc = platform_get_drvdata(pdev);
 
@@ -389,8 +389,6 @@ static int lpc18xx_gpio_remove(struct platform_device *pdev)
 		irq_domain_remove(gc->pin_ic->domain);
 
 	clk_disable_unprepare(gc->clk);
-
-	return 0;
 }
 
 static const struct of_device_id lpc18xx_gpio_match[] = {
@@ -401,7 +399,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_gpio_match);
 
 static struct platform_driver lpc18xx_gpio_driver = {
 	.probe	= lpc18xx_gpio_probe,
-	.remove	= lpc18xx_gpio_remove,
+	.remove_new = lpc18xx_gpio_remove,
 	.driver	= {
 		.name		= "lpc18xx-gpio",
 		.of_match_table	= lpc18xx_gpio_match,
-- 
2.40.1


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

* [PATCH 09/23] gpio: lpc18xx: Convert to platform remove callback returning void
@ 2023-09-28  7:06   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Vladimir Zapolskiy, linux-gpio,
	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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-lpc18xx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c
index ed3f653a1dfc..5c6bb57a8c99 100644
--- a/drivers/gpio/gpio-lpc18xx.c
+++ b/drivers/gpio/gpio-lpc18xx.c
@@ -381,7 +381,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int lpc18xx_gpio_remove(struct platform_device *pdev)
+static void lpc18xx_gpio_remove(struct platform_device *pdev)
 {
 	struct lpc18xx_gpio_chip *gc = platform_get_drvdata(pdev);
 
@@ -389,8 +389,6 @@ static int lpc18xx_gpio_remove(struct platform_device *pdev)
 		irq_domain_remove(gc->pin_ic->domain);
 
 	clk_disable_unprepare(gc->clk);
-
-	return 0;
 }
 
 static const struct of_device_id lpc18xx_gpio_match[] = {
@@ -401,7 +399,7 @@ MODULE_DEVICE_TABLE(of, lpc18xx_gpio_match);
 
 static struct platform_driver lpc18xx_gpio_driver = {
 	.probe	= lpc18xx_gpio_probe,
-	.remove	= lpc18xx_gpio_remove,
+	.remove_new = lpc18xx_gpio_remove,
 	.driver	= {
 		.name		= "lpc18xx-gpio",
 		.of_match_table	= lpc18xx_gpio_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/23] gpio: mb86s7x: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (10 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-mb86s7x.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c
index 248df657c38e..7fb298b4571b 100644
--- a/drivers/gpio/gpio-mb86s7x.c
+++ b/drivers/gpio/gpio-mb86s7x.c
@@ -204,15 +204,13 @@ static int mb86s70_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int mb86s70_gpio_remove(struct platform_device *pdev)
+static void mb86s70_gpio_remove(struct platform_device *pdev)
 {
 	struct mb86s70_gpio_chip *gchip = platform_get_drvdata(pdev);
 
 	acpi_gpiochip_free_interrupts(&gchip->gc);
 	gpiochip_remove(&gchip->gc);
 	clk_disable_unprepare(gchip->clk);
-
-	return 0;
 }
 
 static const struct of_device_id mb86s70_gpio_dt_ids[] = {
@@ -236,7 +234,7 @@ static struct platform_driver mb86s70_gpio_driver = {
 		.acpi_match_table = ACPI_PTR(mb86s70_gpio_acpi_ids),
 	},
 	.probe = mb86s70_gpio_probe,
-	.remove = mb86s70_gpio_remove,
+	.remove_new = mb86s70_gpio_remove,
 };
 module_platform_driver(mb86s70_gpio_driver);
 
-- 
2.40.1


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

* [PATCH 11/23] gpio: mm-lantiq: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (11 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-mm-lantiq.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-mm-lantiq.c b/drivers/gpio/gpio-mm-lantiq.c
index f3c158259636..e855c68c981b 100644
--- a/drivers/gpio/gpio-mm-lantiq.c
+++ b/drivers/gpio/gpio-mm-lantiq.c
@@ -121,13 +121,11 @@ static int ltq_mm_probe(struct platform_device *pdev)
 	return of_mm_gpiochip_add_data(pdev->dev.of_node, &chip->mmchip, chip);
 }
 
-static int ltq_mm_remove(struct platform_device *pdev)
+static void ltq_mm_remove(struct platform_device *pdev)
 {
 	struct ltq_mm *chip = platform_get_drvdata(pdev);
 
 	of_mm_gpiochip_remove(&chip->mmchip);
-
-	return 0;
 }
 
 static const struct of_device_id ltq_mm_match[] = {
@@ -138,7 +136,7 @@ MODULE_DEVICE_TABLE(of, ltq_mm_match);
 
 static struct platform_driver ltq_mm_driver = {
 	.probe = ltq_mm_probe,
-	.remove = ltq_mm_remove,
+	.remove_new = ltq_mm_remove,
 	.driver = {
 		.name = "gpio-mm-ltq",
 		.of_match_table = ltq_mm_match,
-- 
2.40.1


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

* [PATCH 12/23] gpio: mpc5200: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (12 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-mpc5200.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-mpc5200.c b/drivers/gpio/gpio-mpc5200.c
index b49e3ca64015..a199dce3394a 100644
--- a/drivers/gpio/gpio-mpc5200.c
+++ b/drivers/gpio/gpio-mpc5200.c
@@ -165,13 +165,11 @@ static int mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev)
 	return 0;
 }
 
-static int mpc52xx_gpiochip_remove(struct platform_device *ofdev)
+static void mpc52xx_gpiochip_remove(struct platform_device *ofdev)
 {
 	struct mpc52xx_gpiochip *chip = platform_get_drvdata(ofdev);
 
 	of_mm_gpiochip_remove(&chip->mmchip);
-
-	return 0;
 }
 
 static const struct of_device_id mpc52xx_wkup_gpiochip_match[] = {
@@ -185,7 +183,7 @@ static struct platform_driver mpc52xx_wkup_gpiochip_driver = {
 		.of_match_table = mpc52xx_wkup_gpiochip_match,
 	},
 	.probe = mpc52xx_wkup_gpiochip_probe,
-	.remove = mpc52xx_gpiochip_remove,
+	.remove_new = mpc52xx_gpiochip_remove,
 };
 
 /*
@@ -338,7 +336,7 @@ static struct platform_driver mpc52xx_simple_gpiochip_driver = {
 		.of_match_table = mpc52xx_simple_gpiochip_match,
 	},
 	.probe = mpc52xx_simple_gpiochip_probe,
-	.remove = mpc52xx_gpiochip_remove,
+	.remove_new = mpc52xx_gpiochip_remove,
 };
 
 static struct platform_driver * const drivers[] = {
-- 
2.40.1


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

* [PATCH 13/23] gpio: mpc8xxx: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (13 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-mpc8xxx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
index ebf2f511df59..c0125ac73906 100644
--- a/drivers/gpio/gpio-mpc8xxx.c
+++ b/drivers/gpio/gpio-mpc8xxx.c
@@ -419,7 +419,7 @@ static int mpc8xxx_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int mpc8xxx_remove(struct platform_device *pdev)
+static void mpc8xxx_remove(struct platform_device *pdev)
 {
 	struct mpc8xxx_gpio_chip *mpc8xxx_gc = platform_get_drvdata(pdev);
 
@@ -427,8 +427,6 @@ static int mpc8xxx_remove(struct platform_device *pdev)
 		irq_set_chained_handler_and_data(mpc8xxx_gc->irqn, NULL, NULL);
 		irq_domain_remove(mpc8xxx_gc->irq);
 	}
-
-	return 0;
 }
 
 #ifdef CONFIG_ACPI
@@ -441,7 +439,7 @@ MODULE_DEVICE_TABLE(acpi, gpio_acpi_ids);
 
 static struct platform_driver mpc8xxx_plat_driver = {
 	.probe		= mpc8xxx_probe,
-	.remove		= mpc8xxx_remove,
+	.remove_new	= mpc8xxx_remove,
 	.driver		= {
 		.name = "gpio-mpc8xxx",
 		.of_match_table	= mpc8xxx_gpio_ids,
-- 
2.40.1


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

* [PATCH 14/23] gpio: omap: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (14 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Andy Shevchenko, linux-omap, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-omap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index a927680c66f8..8889755e2d03 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1489,7 +1489,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int omap_gpio_remove(struct platform_device *pdev)
+static void omap_gpio_remove(struct platform_device *pdev)
 {
 	struct gpio_bank *bank = platform_get_drvdata(pdev);
 
@@ -1498,8 +1498,6 @@ static int omap_gpio_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	if (bank->dbck_flag)
 		clk_unprepare(bank->dbck);
-
-	return 0;
 }
 
 static int __maybe_unused omap_gpio_runtime_suspend(struct device *dev)
@@ -1560,7 +1558,7 @@ static const struct dev_pm_ops gpio_pm_ops = {
 
 static struct platform_driver omap_gpio_driver = {
 	.probe		= omap_gpio_probe,
-	.remove		= omap_gpio_remove,
+	.remove_new	= omap_gpio_remove,
 	.driver		= {
 		.name	= "omap_gpio",
 		.pm	= &gpio_pm_ops,
-- 
2.40.1


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

* [PATCH 15/23] gpio: rcar: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (15 preceding siblings ...)
  (?)
@ 2023-09-28  7:06 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-rcar.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 86e69cde04da..d8b1baae6357 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -583,14 +583,13 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int gpio_rcar_remove(struct platform_device *pdev)
+static void gpio_rcar_remove(struct platform_device *pdev)
 {
 	struct gpio_rcar_priv *p = platform_get_drvdata(pdev);
 
 	gpiochip_remove(&p->gpio_chip);
 
 	pm_runtime_disable(&pdev->dev);
-	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -658,7 +657,7 @@ static SIMPLE_DEV_PM_OPS(gpio_rcar_pm_ops, gpio_rcar_suspend, gpio_rcar_resume);
 
 static struct platform_driver gpio_rcar_device_driver = {
 	.probe		= gpio_rcar_probe,
-	.remove		= gpio_rcar_remove,
+	.remove_new	= gpio_rcar_remove,
 	.driver		= {
 		.name	= "gpio_rcar",
 		.pm     = &gpio_rcar_pm_ops,
-- 
2.40.1


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

* [PATCH 16/23] gpio: rockchip: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
  (?)
@ 2023-09-28  7:06   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Heiko Stuebner, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-rockchip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index b35b9604413f..23040a8cea34 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -778,14 +778,12 @@ static int rockchip_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rockchip_gpio_remove(struct platform_device *pdev)
+static void rockchip_gpio_remove(struct platform_device *pdev)
 {
 	struct rockchip_pin_bank *bank = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(bank->clk);
 	gpiochip_remove(&bank->gpio_chip);
-
-	return 0;
 }
 
 static const struct of_device_id rockchip_gpio_match[] = {
@@ -796,7 +794,7 @@ static const struct of_device_id rockchip_gpio_match[] = {
 
 static struct platform_driver rockchip_gpio_driver = {
 	.probe		= rockchip_gpio_probe,
-	.remove		= rockchip_gpio_remove,
+	.remove_new	= rockchip_gpio_remove,
 	.driver		= {
 		.name	= "rockchip-gpio",
 		.of_match_table = rockchip_gpio_match,
-- 
2.40.1


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

* [PATCH 16/23] gpio: rockchip: Convert to platform remove callback returning void
@ 2023-09-28  7:06   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Heiko Stuebner, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-rockchip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index b35b9604413f..23040a8cea34 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -778,14 +778,12 @@ static int rockchip_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rockchip_gpio_remove(struct platform_device *pdev)
+static void rockchip_gpio_remove(struct platform_device *pdev)
 {
 	struct rockchip_pin_bank *bank = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(bank->clk);
 	gpiochip_remove(&bank->gpio_chip);
-
-	return 0;
 }
 
 static const struct of_device_id rockchip_gpio_match[] = {
@@ -796,7 +794,7 @@ static const struct of_device_id rockchip_gpio_match[] = {
 
 static struct platform_driver rockchip_gpio_driver = {
 	.probe		= rockchip_gpio_probe,
-	.remove		= rockchip_gpio_remove,
+	.remove_new	= rockchip_gpio_remove,
 	.driver		= {
 		.name	= "rockchip-gpio",
 		.of_match_table = rockchip_gpio_match,
-- 
2.40.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 16/23] gpio: rockchip: Convert to platform remove callback returning void
@ 2023-09-28  7:06   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Heiko Stuebner, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-rockchip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index b35b9604413f..23040a8cea34 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -778,14 +778,12 @@ static int rockchip_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int rockchip_gpio_remove(struct platform_device *pdev)
+static void rockchip_gpio_remove(struct platform_device *pdev)
 {
 	struct rockchip_pin_bank *bank = platform_get_drvdata(pdev);
 
 	clk_disable_unprepare(bank->clk);
 	gpiochip_remove(&bank->gpio_chip);
-
-	return 0;
 }
 
 static const struct of_device_id rockchip_gpio_match[] = {
@@ -796,7 +794,7 @@ static const struct of_device_id rockchip_gpio_match[] = {
 
 static struct platform_driver rockchip_gpio_driver = {
 	.probe		= rockchip_gpio_probe,
-	.remove		= rockchip_gpio_remove,
+	.remove_new	= rockchip_gpio_remove,
 	.driver		= {
 		.name	= "rockchip-gpio",
 		.of_match_table = rockchip_gpio_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 17/23] gpio: tb10x: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (17 preceding siblings ...)
  (?)
@ 2023-09-28  7:07 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-tb10x.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c
index f96d260a4a19..e8c1485b9c73 100644
--- a/drivers/gpio/gpio-tb10x.c
+++ b/drivers/gpio/gpio-tb10x.c
@@ -215,7 +215,7 @@ static int tb10x_gpio_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int tb10x_gpio_remove(struct platform_device *pdev)
+static void tb10x_gpio_remove(struct platform_device *pdev)
 {
 	struct tb10x_gpio *tb10x_gpio = platform_get_drvdata(pdev);
 
@@ -225,8 +225,6 @@ static int tb10x_gpio_remove(struct platform_device *pdev)
 		kfree(tb10x_gpio->domain->gc);
 		irq_domain_remove(tb10x_gpio->domain);
 	}
-
-	return 0;
 }
 
 static const struct of_device_id tb10x_gpio_dt_ids[] = {
@@ -237,7 +235,7 @@ MODULE_DEVICE_TABLE(of, tb10x_gpio_dt_ids);
 
 static struct platform_driver tb10x_gpio_driver = {
 	.probe		= tb10x_gpio_probe,
-	.remove		= tb10x_gpio_remove,
+	.remove_new	= tb10x_gpio_remove,
 	.driver = {
 		.name	= "tb10x-gpio",
 		.of_match_table = tb10x_gpio_dt_ids,
-- 
2.40.1


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

* [PATCH 18/23] gpio: ts5500: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (18 preceding siblings ...)
  (?)
@ 2023-09-28  7:07 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-ts5500.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-ts5500.c b/drivers/gpio/gpio-ts5500.c
index 8e03614c7a24..90f8e9e9915e 100644
--- a/drivers/gpio/gpio-ts5500.c
+++ b/drivers/gpio/gpio-ts5500.c
@@ -412,13 +412,11 @@ static int ts5500_dio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int ts5500_dio_remove(struct platform_device *pdev)
+static void ts5500_dio_remove(struct platform_device *pdev)
 {
 	struct ts5500_priv *priv = platform_get_drvdata(pdev);
 
 	ts5500_disable_irq(priv);
-
-	return 0;
 }
 
 static const struct platform_device_id ts5500_dio_ids[] = {
@@ -435,7 +433,7 @@ static struct platform_driver ts5500_dio_driver = {
 		.name = "ts5500-dio",
 	},
 	.probe = ts5500_dio_probe,
-	.remove = ts5500_dio_remove,
+	.remove_new = ts5500_dio_remove,
 	.id_table = ts5500_dio_ids,
 };
 
-- 
2.40.1


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

* [PATCH 19/23] gpio: uniphier: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
@ 2023-09-28  7:07   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Kunihiko Hayashi, Masami Hiramatsu, linux-gpio,
	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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-uniphier.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 9725b7aa18a7..1f440707f8f4 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -414,13 +414,11 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int uniphier_gpio_remove(struct platform_device *pdev)
+static void uniphier_gpio_remove(struct platform_device *pdev)
 {
 	struct uniphier_gpio_priv *priv = platform_get_drvdata(pdev);
 
 	irq_domain_remove(priv->domain);
-
-	return 0;
 }
 
 static int __maybe_unused uniphier_gpio_suspend(struct device *dev)
@@ -482,7 +480,7 @@ MODULE_DEVICE_TABLE(of, uniphier_gpio_match);
 
 static struct platform_driver uniphier_gpio_driver = {
 	.probe = uniphier_gpio_probe,
-	.remove = uniphier_gpio_remove,
+	.remove_new = uniphier_gpio_remove,
 	.driver = {
 		.name = "uniphier-gpio",
 		.of_match_table = uniphier_gpio_match,
-- 
2.40.1


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

* [PATCH 19/23] gpio: uniphier: Convert to platform remove callback returning void
@ 2023-09-28  7:07   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Kunihiko Hayashi, Masami Hiramatsu, linux-gpio,
	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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-uniphier.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 9725b7aa18a7..1f440707f8f4 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -414,13 +414,11 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int uniphier_gpio_remove(struct platform_device *pdev)
+static void uniphier_gpio_remove(struct platform_device *pdev)
 {
 	struct uniphier_gpio_priv *priv = platform_get_drvdata(pdev);
 
 	irq_domain_remove(priv->domain);
-
-	return 0;
 }
 
 static int __maybe_unused uniphier_gpio_suspend(struct device *dev)
@@ -482,7 +480,7 @@ MODULE_DEVICE_TABLE(of, uniphier_gpio_match);
 
 static struct platform_driver uniphier_gpio_driver = {
 	.probe = uniphier_gpio_probe,
-	.remove = uniphier_gpio_remove,
+	.remove_new = uniphier_gpio_remove,
 	.driver = {
 		.name = "uniphier-gpio",
 		.of_match_table = uniphier_gpio_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 20/23] gpio: xgene-sb: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
                   ` (20 preceding siblings ...)
  (?)
@ 2023-09-28  7:07 ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-xgene-sb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c
index 453bf9338ac4..bd5befa807c3 100644
--- a/drivers/gpio/gpio-xgene-sb.c
+++ b/drivers/gpio/gpio-xgene-sb.c
@@ -295,15 +295,13 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int xgene_gpio_sb_remove(struct platform_device *pdev)
+static void xgene_gpio_sb_remove(struct platform_device *pdev)
 {
 	struct xgene_gpio_sb *priv = platform_get_drvdata(pdev);
 
 	acpi_gpiochip_free_interrupts(&priv->gc);
 
 	irq_domain_remove(priv->irq_domain);
-
-	return 0;
 }
 
 static const struct of_device_id xgene_gpio_sb_of_match[] = {
@@ -327,7 +325,7 @@ static struct platform_driver xgene_gpio_sb_driver = {
 		   .acpi_match_table = ACPI_PTR(xgene_gpio_sb_acpi_match),
 		   },
 	.probe = xgene_gpio_sb_probe,
-	.remove = xgene_gpio_sb_remove,
+	.remove_new = xgene_gpio_sb_remove,
 };
 module_platform_driver(xgene_gpio_sb_driver);
 
-- 
2.40.1


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

* [PATCH 21/23] gpio: xgs-iproc: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
@ 2023-09-28  7:07   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-gpio,
	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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-xgs-iproc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xgs-iproc.c b/drivers/gpio/gpio-xgs-iproc.c
index 2d23b27d55af..d445eea03687 100644
--- a/drivers/gpio/gpio-xgs-iproc.c
+++ b/drivers/gpio/gpio-xgs-iproc.c
@@ -291,7 +291,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int iproc_gpio_remove(struct platform_device *pdev)
+static void iproc_gpio_remove(struct platform_device *pdev)
 {
 	struct iproc_gpio_chip *chip = platform_get_drvdata(pdev);
 
@@ -302,8 +302,6 @@ static int iproc_gpio_remove(struct platform_device *pdev)
 		val &= ~IPROC_CCA_INT_F_GPIOINT;
 		writel_relaxed(val, chip->intr + IPROC_CCA_INT_MASK);
 	}
-
-	return 0;
 }
 
 static const struct of_device_id bcm_iproc_gpio_of_match[] = {
@@ -318,7 +316,7 @@ static struct platform_driver bcm_iproc_gpio_driver = {
 		.of_match_table = bcm_iproc_gpio_of_match,
 	},
 	.probe = iproc_gpio_probe,
-	.remove = iproc_gpio_remove,
+	.remove_new = iproc_gpio_remove,
 };
 
 module_platform_driver(bcm_iproc_gpio_driver);
-- 
2.40.1


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

* [PATCH 21/23] gpio: xgs-iproc: Convert to platform remove callback returning void
@ 2023-09-28  7:07   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-gpio,
	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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-xgs-iproc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xgs-iproc.c b/drivers/gpio/gpio-xgs-iproc.c
index 2d23b27d55af..d445eea03687 100644
--- a/drivers/gpio/gpio-xgs-iproc.c
+++ b/drivers/gpio/gpio-xgs-iproc.c
@@ -291,7 +291,7 @@ static int iproc_gpio_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int iproc_gpio_remove(struct platform_device *pdev)
+static void iproc_gpio_remove(struct platform_device *pdev)
 {
 	struct iproc_gpio_chip *chip = platform_get_drvdata(pdev);
 
@@ -302,8 +302,6 @@ static int iproc_gpio_remove(struct platform_device *pdev)
 		val &= ~IPROC_CCA_INT_F_GPIOINT;
 		writel_relaxed(val, chip->intr + IPROC_CCA_INT_MASK);
 	}
-
-	return 0;
 }
 
 static const struct of_device_id bcm_iproc_gpio_of_match[] = {
@@ -318,7 +316,7 @@ static struct platform_driver bcm_iproc_gpio_driver = {
 		.of_match_table = bcm_iproc_gpio_of_match,
 	},
 	.probe = iproc_gpio_probe,
-	.remove = iproc_gpio_remove,
+	.remove_new = iproc_gpio_remove,
 };
 
 module_platform_driver(bcm_iproc_gpio_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 22/23] gpio: xilinx: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
@ 2023-09-28  7:07   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Shubhrajyoti Datta, Srinivas Neeli, Michal Simek,
	Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-xilinx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index a16945e8319e..823198368250 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -332,7 +332,7 @@ static int __maybe_unused xgpio_suspend(struct device *dev)
  *
  * Return: 0 always
  */
-static int xgpio_remove(struct platform_device *pdev)
+static void xgpio_remove(struct platform_device *pdev)
 {
 	struct xgpio_instance *gpio = platform_get_drvdata(pdev);
 
@@ -340,8 +340,6 @@ static int xgpio_remove(struct platform_device *pdev)
 	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	clk_disable_unprepare(gpio->clk);
-
-	return 0;
 }
 
 /**
@@ -715,7 +713,7 @@ MODULE_DEVICE_TABLE(of, xgpio_of_match);
 
 static struct platform_driver xgpio_plat_driver = {
 	.probe		= xgpio_probe,
-	.remove		= xgpio_remove,
+	.remove_new	= xgpio_remove,
 	.driver		= {
 			.name = "gpio-xilinx",
 			.of_match_table	= xgpio_of_match,
-- 
2.40.1


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

* [PATCH 22/23] gpio: xilinx: Convert to platform remove callback returning void
@ 2023-09-28  7:07   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Shubhrajyoti Datta, Srinivas Neeli, Michal Simek,
	Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-xilinx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index a16945e8319e..823198368250 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -332,7 +332,7 @@ static int __maybe_unused xgpio_suspend(struct device *dev)
  *
  * Return: 0 always
  */
-static int xgpio_remove(struct platform_device *pdev)
+static void xgpio_remove(struct platform_device *pdev)
 {
 	struct xgpio_instance *gpio = platform_get_drvdata(pdev);
 
@@ -340,8 +340,6 @@ static int xgpio_remove(struct platform_device *pdev)
 	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	clk_disable_unprepare(gpio->clk);
-
-	return 0;
 }
 
 /**
@@ -715,7 +713,7 @@ MODULE_DEVICE_TABLE(of, xgpio_of_match);
 
 static struct platform_driver xgpio_plat_driver = {
 	.probe		= xgpio_probe,
-	.remove		= xgpio_remove,
+	.remove_new	= xgpio_remove,
 	.driver		= {
 			.name = "gpio-xilinx",
 			.of_match_table	= xgpio_of_match,
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 23/23] gpio: zynq: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
@ 2023-09-28  7:07   ` Uwe Kleine-König
  -1 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Shubhrajyoti Datta, Srinivas Neeli, Michal Simek,
	Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-zynq.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 324e942c0650..466e23031afc 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -1010,7 +1010,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)
  *
  * Return: 0 always
  */
-static int zynq_gpio_remove(struct platform_device *pdev)
+static void zynq_gpio_remove(struct platform_device *pdev)
 {
 	struct zynq_gpio *gpio = platform_get_drvdata(pdev);
 	int ret;
@@ -1022,7 +1022,6 @@ static int zynq_gpio_remove(struct platform_device *pdev)
 	clk_disable_unprepare(gpio->clk);
 	device_set_wakeup_capable(&pdev->dev, 0);
 	pm_runtime_disable(&pdev->dev);
-	return 0;
 }
 
 static struct platform_driver zynq_gpio_driver = {
@@ -1032,7 +1031,7 @@ static struct platform_driver zynq_gpio_driver = {
 		.of_match_table = zynq_gpio_of_match,
 	},
 	.probe = zynq_gpio_probe,
-	.remove = zynq_gpio_remove,
+	.remove_new = zynq_gpio_remove,
 };
 
 module_platform_driver(zynq_gpio_driver);
-- 
2.40.1


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

* [PATCH 23/23] gpio: zynq: Convert to platform remove callback returning void
@ 2023-09-28  7:07   ` Uwe Kleine-König
  0 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2023-09-28  7:07 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Shubhrajyoti Datta, Srinivas Neeli, Michal Simek,
	Andy Shevchenko, linux-gpio, 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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/gpio-zynq.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 324e942c0650..466e23031afc 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -1010,7 +1010,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)
  *
  * Return: 0 always
  */
-static int zynq_gpio_remove(struct platform_device *pdev)
+static void zynq_gpio_remove(struct platform_device *pdev)
 {
 	struct zynq_gpio *gpio = platform_get_drvdata(pdev);
 	int ret;
@@ -1022,7 +1022,6 @@ static int zynq_gpio_remove(struct platform_device *pdev)
 	clk_disable_unprepare(gpio->clk);
 	device_set_wakeup_capable(&pdev->dev, 0);
 	pm_runtime_disable(&pdev->dev);
-	return 0;
 }
 
 static struct platform_driver zynq_gpio_driver = {
@@ -1032,7 +1031,7 @@ static struct platform_driver zynq_gpio_driver = {
 		.of_match_table = zynq_gpio_of_match,
 	},
 	.probe = zynq_gpio_probe,
-	.remove = zynq_gpio_remove,
+	.remove_new = zynq_gpio_remove,
 };
 
 module_platform_driver(zynq_gpio_driver);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 22/23] gpio: xilinx: Convert to platform remove callback returning void
  2023-09-28  7:07   ` Uwe Kleine-König
@ 2023-09-28  8:32     ` Datta, Shubhrajyoti
  -1 siblings, 0 replies; 49+ messages in thread
From: Datta, Shubhrajyoti @ 2023-09-28  8:32 UTC (permalink / raw)
  To: Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski
  Cc: Neeli, Srinivas, Simek, Michal, Andy Shevchenko, linux-gpio,
	linux-arm-kernel, linux-kernel

[AMD Official Use Only - General]

Hi ,
Thanks for the patch

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Thursday, September 28, 2023 12:37 PM
> To: Linus Walleij <linus.walleij@linaro.org>; Bartosz Golaszewski
> <brgl@bgdev.pl>
> Cc: Datta, Shubhrajyoti <shubhrajyoti.datta@amd.com>; Neeli, Srinivas
> <srinivas.neeli@amd.com>; Simek, Michal <michal.simek@amd.com>; Andy
> Shevchenko <andy@kernel.org>; linux-gpio@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 22/23] gpio: xilinx: Convert to platform remove callback
> returning void
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> 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 ignored (apart from emitting a
> warning) 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. Eventually after all drivers are converted, .remove_new()
> will be renamed to .remove().
>
> Trivially convert this driver from always returning zero in the remove callback
> to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>

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

* RE: [PATCH 22/23] gpio: xilinx: Convert to platform remove callback returning void
@ 2023-09-28  8:32     ` Datta, Shubhrajyoti
  0 siblings, 0 replies; 49+ messages in thread
From: Datta, Shubhrajyoti @ 2023-09-28  8:32 UTC (permalink / raw)
  To: Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski
  Cc: Neeli, Srinivas, Simek, Michal, Andy Shevchenko, linux-gpio,
	linux-arm-kernel, linux-kernel

[AMD Official Use Only - General]

Hi ,
Thanks for the patch

> -----Original Message-----
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Sent: Thursday, September 28, 2023 12:37 PM
> To: Linus Walleij <linus.walleij@linaro.org>; Bartosz Golaszewski
> <brgl@bgdev.pl>
> Cc: Datta, Shubhrajyoti <shubhrajyoti.datta@amd.com>; Neeli, Srinivas
> <srinivas.neeli@amd.com>; Simek, Michal <michal.simek@amd.com>; Andy
> Shevchenko <andy@kernel.org>; linux-gpio@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: [PATCH 22/23] gpio: xilinx: Convert to platform remove callback
> returning void
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> 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 ignored (apart from emitting a
> warning) 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. Eventually after all drivers are converted, .remove_new()
> will be renamed to .remove().
>
> Trivially convert this driver from always returning zero in the remove callback
> to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
_______________________________________________
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] 49+ messages in thread

* Re: [PATCH 03/23] gpio: brcmstb: Convert to platform remove callback returning void
  2023-09-28  7:06   ` Uwe Kleine-König
@ 2023-09-28 21:22     ` Florian Fainelli
  -1 siblings, 0 replies; 49+ messages in thread
From: Florian Fainelli @ 2023-09-28 21:22 UTC (permalink / raw)
  To: Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski
  Cc: Doug Berger, Broadcom internal kernel review list,
	Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-kernel

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



On 9/28/2023 9:06 AM, Uwe Kleine-König 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

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

* Re: [PATCH 03/23] gpio: brcmstb: Convert to platform remove callback returning void
@ 2023-09-28 21:22     ` Florian Fainelli
  0 siblings, 0 replies; 49+ messages in thread
From: Florian Fainelli @ 2023-09-28 21:22 UTC (permalink / raw)
  To: Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski
  Cc: Doug Berger, Broadcom internal kernel review list,
	Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-kernel


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



On 9/28/2023 9:06 AM, Uwe Kleine-König 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

* Re: [PATCH 21/23] gpio: xgs-iproc: Convert to platform remove callback returning void
  2023-09-28  7:07   ` Uwe Kleine-König
@ 2023-09-28 21:22     ` Florian Fainelli
  -1 siblings, 0 replies; 49+ messages in thread
From: Florian Fainelli @ 2023-09-28 21:22 UTC (permalink / raw)
  To: Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-gpio,
	linux-arm-kernel, linux-kernel

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



On 9/28/2023 9:07 AM, Uwe Kleine-König 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

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

* Re: [PATCH 21/23] gpio: xgs-iproc: Convert to platform remove callback returning void
@ 2023-09-28 21:22     ` Florian Fainelli
  0 siblings, 0 replies; 49+ messages in thread
From: Florian Fainelli @ 2023-09-28 21:22 UTC (permalink / raw)
  To: Uwe Kleine-König, Linus Walleij, Bartosz Golaszewski
  Cc: Andy Shevchenko, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, linux-gpio,
	linux-arm-kernel, linux-kernel


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



On 9/28/2023 9:07 AM, Uwe Kleine-König 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

* Re: [PATCH 00/23] gpio: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
  (?)
@ 2023-09-28 21:54   ` Linus Walleij
  -1 siblings, 0 replies; 49+ messages in thread
From: Linus Walleij @ 2023-09-28 21:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Bartosz Golaszewski, Mun Yew Tham, Andy Shevchenko, linux-gpio,
	linux-kernel, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

On Thu, Sep 28, 2023 at 9:07 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> this series converts all platform drivers below drivers/gpio to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.

The whole set looks good to me:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-09-28 21:54   ` Linus Walleij
  0 siblings, 0 replies; 49+ messages in thread
From: Linus Walleij @ 2023-09-28 21:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Bartosz Golaszewski, Mun Yew Tham, Andy Shevchenko, linux-gpio,
	linux-kernel, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

On Thu, Sep 28, 2023 at 9:07 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> this series converts all platform drivers below drivers/gpio to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.

The whole set looks good to me:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-09-28 21:54   ` Linus Walleij
  0 siblings, 0 replies; 49+ messages in thread
From: Linus Walleij @ 2023-09-28 21:54 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Bartosz Golaszewski, Mun Yew Tham, Andy Shevchenko, linux-gpio,
	linux-kernel, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

On Thu, Sep 28, 2023 at 9:07 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> this series converts all platform drivers below drivers/gpio to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.

The whole set looks good to me:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 16/23] gpio: rockchip: Convert to platform remove callback returning void
  2023-09-28  7:06   ` Uwe Kleine-König
  (?)
@ 2023-10-01 22:45     ` Heiko Stuebner
  -1 siblings, 0 replies; 49+ messages in thread
From: Heiko Stuebner @ 2023-10-01 22:45 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Uwe Kleine-König
  Cc: Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-rockchip,
	linux-kernel

Am Donnerstag, 28. September 2023, 09:06:59 CEST schrieb Uwe Kleine-König:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



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

* Re: [PATCH 16/23] gpio: rockchip: Convert to platform remove callback returning void
@ 2023-10-01 22:45     ` Heiko Stuebner
  0 siblings, 0 replies; 49+ messages in thread
From: Heiko Stuebner @ 2023-10-01 22:45 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Uwe Kleine-König
  Cc: Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-rockchip,
	linux-kernel

Am Donnerstag, 28. September 2023, 09:06:59 CEST schrieb Uwe Kleine-König:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 16/23] gpio: rockchip: Convert to platform remove callback returning void
@ 2023-10-01 22:45     ` Heiko Stuebner
  0 siblings, 0 replies; 49+ messages in thread
From: Heiko Stuebner @ 2023-10-01 22:45 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Uwe Kleine-König
  Cc: Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-rockchip,
	linux-kernel

Am Donnerstag, 28. September 2023, 09:06:59 CEST schrieb Uwe Kleine-König:
> 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 ignored (apart
> from emitting a warning) 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. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>



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

* Re: [PATCH 00/23] gpio: Convert to platform remove callback returning void
  2023-09-28  7:06 ` Uwe Kleine-König
  (?)
@ 2023-10-02  6:52   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 49+ messages in thread
From: Bartosz Golaszewski @ 2023-10-02  6:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Linus Walleij, Mun Yew Tham, Andy Shevchenko, linux-gpio,
	linux-kernel, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

On Thu, Sep 28, 2023 at 9:07 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/gpio to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> There are no interdependencies between the patches. As there are still
> quite a few drivers to convert, I'm happy about every patch that makes
> it in. So even if there is a merge conflict with one patch until you
> apply or a subject prefix is suboptimal, please apply the remainder of
> this series anyhow.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (23):
>   gpio: altera: Convert to platform remove callback returning void
>   gpio: amdpt: Convert to platform remove callback returning void
>   gpio: brcmstb: Convert to platform remove callback returning void
>   gpio: cadence: Convert to platform remove callback returning void
>   gpio: dln2: Convert to platform remove callback returning void
>   gpio: ftgpio010: Convert to platform remove callback returning void
>   gpio: grgpio: Convert to platform remove callback returning void
>   gpio: ljca: Convert to platform remove callback returning void
>   gpio: lpc18xx: Convert to platform remove callback returning void
>   gpio: mb86s7x: Convert to platform remove callback returning void
>   gpio: mm-lantiq: Convert to platform remove callback returning void
>   gpio: mpc5200: Convert to platform remove callback returning void
>   gpio: mpc8xxx: Convert to platform remove callback returning void
>   gpio: omap: Convert to platform remove callback returning void
>   gpio: rcar: Convert to platform remove callback returning void
>   gpio: rockchip: Convert to platform remove callback returning void
>   gpio: tb10x: Convert to platform remove callback returning void
>   gpio: ts5500: Convert to platform remove callback returning void
>   gpio: uniphier: Convert to platform remove callback returning void
>   gpio: xgene-sb: Convert to platform remove callback returning void
>   gpio: xgs-iproc: Convert to platform remove callback returning void
>   gpio: xilinx: Convert to platform remove callback returning void
>   gpio: zynq: Convert to platform remove callback returning void
>
>  drivers/gpio/gpio-altera.c    | 6 ++----
>  drivers/gpio/gpio-amdpt.c     | 6 ++----
>  drivers/gpio/gpio-brcmstb.c   | 6 ++----
>  drivers/gpio/gpio-cadence.c   | 6 ++----
>  drivers/gpio/gpio-dln2.c      | 6 ++----
>  drivers/gpio/gpio-ftgpio010.c | 6 ++----
>  drivers/gpio/gpio-grgpio.c    | 6 ++----
>  drivers/gpio/gpio-ljca.c      | 5 ++---
>  drivers/gpio/gpio-lpc18xx.c   | 6 ++----
>  drivers/gpio/gpio-mb86s7x.c   | 6 ++----
>  drivers/gpio/gpio-mm-lantiq.c | 6 ++----
>  drivers/gpio/gpio-mpc5200.c   | 8 +++-----
>  drivers/gpio/gpio-mpc8xxx.c   | 6 ++----
>  drivers/gpio/gpio-omap.c      | 6 ++----
>  drivers/gpio/gpio-rcar.c      | 5 ++---
>  drivers/gpio/gpio-rockchip.c  | 6 ++----
>  drivers/gpio/gpio-tb10x.c     | 6 ++----
>  drivers/gpio/gpio-ts5500.c    | 6 ++----
>  drivers/gpio/gpio-uniphier.c  | 6 ++----
>  drivers/gpio/gpio-xgene-sb.c  | 6 ++----
>  drivers/gpio/gpio-xgs-iproc.c | 6 ++----
>  drivers/gpio/gpio-xilinx.c    | 6 ++----
>  drivers/gpio/gpio-zynq.c      | 5 ++---
>  23 files changed, 47 insertions(+), 90 deletions(-)
>
>
> base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3
> --
> 2.40.1
>

Series queued for v6.7, thanks!

Bart

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

* Re: [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-10-02  6:52   ` Bartosz Golaszewski
  0 siblings, 0 replies; 49+ messages in thread
From: Bartosz Golaszewski @ 2023-10-02  6:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Linus Walleij, Mun Yew Tham, Andy Shevchenko, linux-gpio,
	linux-kernel, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

On Thu, Sep 28, 2023 at 9:07 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/gpio to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> There are no interdependencies between the patches. As there are still
> quite a few drivers to convert, I'm happy about every patch that makes
> it in. So even if there is a merge conflict with one patch until you
> apply or a subject prefix is suboptimal, please apply the remainder of
> this series anyhow.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (23):
>   gpio: altera: Convert to platform remove callback returning void
>   gpio: amdpt: Convert to platform remove callback returning void
>   gpio: brcmstb: Convert to platform remove callback returning void
>   gpio: cadence: Convert to platform remove callback returning void
>   gpio: dln2: Convert to platform remove callback returning void
>   gpio: ftgpio010: Convert to platform remove callback returning void
>   gpio: grgpio: Convert to platform remove callback returning void
>   gpio: ljca: Convert to platform remove callback returning void
>   gpio: lpc18xx: Convert to platform remove callback returning void
>   gpio: mb86s7x: Convert to platform remove callback returning void
>   gpio: mm-lantiq: Convert to platform remove callback returning void
>   gpio: mpc5200: Convert to platform remove callback returning void
>   gpio: mpc8xxx: Convert to platform remove callback returning void
>   gpio: omap: Convert to platform remove callback returning void
>   gpio: rcar: Convert to platform remove callback returning void
>   gpio: rockchip: Convert to platform remove callback returning void
>   gpio: tb10x: Convert to platform remove callback returning void
>   gpio: ts5500: Convert to platform remove callback returning void
>   gpio: uniphier: Convert to platform remove callback returning void
>   gpio: xgene-sb: Convert to platform remove callback returning void
>   gpio: xgs-iproc: Convert to platform remove callback returning void
>   gpio: xilinx: Convert to platform remove callback returning void
>   gpio: zynq: Convert to platform remove callback returning void
>
>  drivers/gpio/gpio-altera.c    | 6 ++----
>  drivers/gpio/gpio-amdpt.c     | 6 ++----
>  drivers/gpio/gpio-brcmstb.c   | 6 ++----
>  drivers/gpio/gpio-cadence.c   | 6 ++----
>  drivers/gpio/gpio-dln2.c      | 6 ++----
>  drivers/gpio/gpio-ftgpio010.c | 6 ++----
>  drivers/gpio/gpio-grgpio.c    | 6 ++----
>  drivers/gpio/gpio-ljca.c      | 5 ++---
>  drivers/gpio/gpio-lpc18xx.c   | 6 ++----
>  drivers/gpio/gpio-mb86s7x.c   | 6 ++----
>  drivers/gpio/gpio-mm-lantiq.c | 6 ++----
>  drivers/gpio/gpio-mpc5200.c   | 8 +++-----
>  drivers/gpio/gpio-mpc8xxx.c   | 6 ++----
>  drivers/gpio/gpio-omap.c      | 6 ++----
>  drivers/gpio/gpio-rcar.c      | 5 ++---
>  drivers/gpio/gpio-rockchip.c  | 6 ++----
>  drivers/gpio/gpio-tb10x.c     | 6 ++----
>  drivers/gpio/gpio-ts5500.c    | 6 ++----
>  drivers/gpio/gpio-uniphier.c  | 6 ++----
>  drivers/gpio/gpio-xgene-sb.c  | 6 ++----
>  drivers/gpio/gpio-xgs-iproc.c | 6 ++----
>  drivers/gpio/gpio-xilinx.c    | 6 ++----
>  drivers/gpio/gpio-zynq.c      | 5 ++---
>  23 files changed, 47 insertions(+), 90 deletions(-)
>
>
> base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3
> --
> 2.40.1
>

Series queued for v6.7, thanks!

Bart

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 00/23] gpio: Convert to platform remove callback returning void
@ 2023-10-02  6:52   ` Bartosz Golaszewski
  0 siblings, 0 replies; 49+ messages in thread
From: Bartosz Golaszewski @ 2023-10-02  6:52 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Linus Walleij, Mun Yew Tham, Andy Shevchenko, linux-gpio,
	linux-kernel, Doug Berger, Florian Fainelli,
	Broadcom internal kernel review list, linux-arm-kernel,
	Vladimir Zapolskiy, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman, linux-omap, Heiko Stuebner, linux-rockchip,
	Kunihiko Hayashi, Masami Hiramatsu, Ray Jui, Scott Branden,
	Shubhrajyoti Datta, Srinivas Neeli, Michal Simek

On Thu, Sep 28, 2023 at 9:07 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> Hello,
>
> this series converts all platform drivers below drivers/gpio to use
> .remove_new(). The motivation is to get rid of an integer return code
> that is (mostly) ignored by the platform driver core and error prone on
> the driver side.
>
> See commit 5c5a7680e67b ("platform: Provide a remove callback that
> returns no value") for an extended explanation and the eventual goal.
>
> There are no interdependencies between the patches. As there are still
> quite a few drivers to convert, I'm happy about every patch that makes
> it in. So even if there is a merge conflict with one patch until you
> apply or a subject prefix is suboptimal, please apply the remainder of
> this series anyhow.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (23):
>   gpio: altera: Convert to platform remove callback returning void
>   gpio: amdpt: Convert to platform remove callback returning void
>   gpio: brcmstb: Convert to platform remove callback returning void
>   gpio: cadence: Convert to platform remove callback returning void
>   gpio: dln2: Convert to platform remove callback returning void
>   gpio: ftgpio010: Convert to platform remove callback returning void
>   gpio: grgpio: Convert to platform remove callback returning void
>   gpio: ljca: Convert to platform remove callback returning void
>   gpio: lpc18xx: Convert to platform remove callback returning void
>   gpio: mb86s7x: Convert to platform remove callback returning void
>   gpio: mm-lantiq: Convert to platform remove callback returning void
>   gpio: mpc5200: Convert to platform remove callback returning void
>   gpio: mpc8xxx: Convert to platform remove callback returning void
>   gpio: omap: Convert to platform remove callback returning void
>   gpio: rcar: Convert to platform remove callback returning void
>   gpio: rockchip: Convert to platform remove callback returning void
>   gpio: tb10x: Convert to platform remove callback returning void
>   gpio: ts5500: Convert to platform remove callback returning void
>   gpio: uniphier: Convert to platform remove callback returning void
>   gpio: xgene-sb: Convert to platform remove callback returning void
>   gpio: xgs-iproc: Convert to platform remove callback returning void
>   gpio: xilinx: Convert to platform remove callback returning void
>   gpio: zynq: Convert to platform remove callback returning void
>
>  drivers/gpio/gpio-altera.c    | 6 ++----
>  drivers/gpio/gpio-amdpt.c     | 6 ++----
>  drivers/gpio/gpio-brcmstb.c   | 6 ++----
>  drivers/gpio/gpio-cadence.c   | 6 ++----
>  drivers/gpio/gpio-dln2.c      | 6 ++----
>  drivers/gpio/gpio-ftgpio010.c | 6 ++----
>  drivers/gpio/gpio-grgpio.c    | 6 ++----
>  drivers/gpio/gpio-ljca.c      | 5 ++---
>  drivers/gpio/gpio-lpc18xx.c   | 6 ++----
>  drivers/gpio/gpio-mb86s7x.c   | 6 ++----
>  drivers/gpio/gpio-mm-lantiq.c | 6 ++----
>  drivers/gpio/gpio-mpc5200.c   | 8 +++-----
>  drivers/gpio/gpio-mpc8xxx.c   | 6 ++----
>  drivers/gpio/gpio-omap.c      | 6 ++----
>  drivers/gpio/gpio-rcar.c      | 5 ++---
>  drivers/gpio/gpio-rockchip.c  | 6 ++----
>  drivers/gpio/gpio-tb10x.c     | 6 ++----
>  drivers/gpio/gpio-ts5500.c    | 6 ++----
>  drivers/gpio/gpio-uniphier.c  | 6 ++----
>  drivers/gpio/gpio-xgene-sb.c  | 6 ++----
>  drivers/gpio/gpio-xgs-iproc.c | 6 ++----
>  drivers/gpio/gpio-xilinx.c    | 6 ++----
>  drivers/gpio/gpio-zynq.c      | 5 ++---
>  23 files changed, 47 insertions(+), 90 deletions(-)
>
>
> base-commit: 719136e5c24768ebdf80b9daa53facebbdd377c3
> --
> 2.40.1
>

Series queued for v6.7, thanks!

Bart

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

end of thread, other threads:[~2023-10-02  6:53 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-28  7:06 [PATCH 00/23] gpio: Convert to platform remove callback returning void Uwe Kleine-König
2023-09-28  7:06 ` Uwe Kleine-König
2023-09-28  7:06 ` Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 01/23] gpio: altera: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 02/23] gpio: amdpt: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 03/23] gpio: brcmstb: " Uwe Kleine-König
2023-09-28  7:06   ` Uwe Kleine-König
2023-09-28 21:22   ` Florian Fainelli
2023-09-28 21:22     ` Florian Fainelli
2023-09-28  7:06 ` [PATCH 04/23] gpio: cadence: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 05/23] gpio: dln2: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 06/23] gpio: ftgpio010: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 07/23] gpio: grgpio: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 08/23] gpio: ljca: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 09/23] gpio: lpc18xx: " Uwe Kleine-König
2023-09-28  7:06   ` Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 10/23] gpio: mb86s7x: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 11/23] gpio: mm-lantiq: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 12/23] gpio: mpc5200: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 13/23] gpio: mpc8xxx: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 14/23] gpio: omap: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 15/23] gpio: rcar: " Uwe Kleine-König
2023-09-28  7:06 ` [PATCH 16/23] gpio: rockchip: " Uwe Kleine-König
2023-09-28  7:06   ` Uwe Kleine-König
2023-09-28  7:06   ` Uwe Kleine-König
2023-10-01 22:45   ` Heiko Stuebner
2023-10-01 22:45     ` Heiko Stuebner
2023-10-01 22:45     ` Heiko Stuebner
2023-09-28  7:07 ` [PATCH 17/23] gpio: tb10x: " Uwe Kleine-König
2023-09-28  7:07 ` [PATCH 18/23] gpio: ts5500: " Uwe Kleine-König
2023-09-28  7:07 ` [PATCH 19/23] gpio: uniphier: " Uwe Kleine-König
2023-09-28  7:07   ` Uwe Kleine-König
2023-09-28  7:07 ` [PATCH 20/23] gpio: xgene-sb: " Uwe Kleine-König
2023-09-28  7:07 ` [PATCH 21/23] gpio: xgs-iproc: " Uwe Kleine-König
2023-09-28  7:07   ` Uwe Kleine-König
2023-09-28 21:22   ` Florian Fainelli
2023-09-28 21:22     ` Florian Fainelli
2023-09-28  7:07 ` [PATCH 22/23] gpio: xilinx: " Uwe Kleine-König
2023-09-28  7:07   ` Uwe Kleine-König
2023-09-28  8:32   ` Datta, Shubhrajyoti
2023-09-28  8:32     ` Datta, Shubhrajyoti
2023-09-28  7:07 ` [PATCH 23/23] gpio: zynq: " Uwe Kleine-König
2023-09-28  7:07   ` Uwe Kleine-König
2023-09-28 21:54 ` [PATCH 00/23] gpio: " Linus Walleij
2023-09-28 21:54   ` Linus Walleij
2023-09-28 21:54   ` Linus Walleij
2023-10-02  6:52 ` Bartosz Golaszewski
2023-10-02  6:52   ` Bartosz Golaszewski
2023-10-02  6:52   ` Bartosz Golaszewski

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.