public inbox for linux-sunxi@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 00/24] staging: Convert to platform remove callback returning void
@ 2023-04-03 15:39 Uwe Kleine-König
  2023-04-03 15:40 ` [PATCH 15/24] staging: media: sunxi: cedrus: " Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-04-03 15:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Deepak R Varma, Yuan Can, Simon Horman,
	Sven Van Asbroeck, Vaibhav Hiremath, Johan Hovold, Alex Elder,
	Eugen Hristev, Mauro Carvalho Chehab, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Steve Longerbeam,
	Philipp Zabel, Shawn Guo, Sascha Hauer, Neil Armstrong,
	Kevin Hilman, Laurent Pinchart, Ezequiel Garcia, Maxime Ripard,
	Paul Kocialkowski, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Parthiban Veerasooran, Christian Gromm, Davidlohr Bueso,
	Marc Dietrich, Florian Fainelli, Ray Jui, Scott Branden,
	Umang Jain, Andy Shevchenko, Adrien Thierry, Stefan Wahren,
	Fabio M. De Francesco, Phil Elwell, Jakob Koschel
  Cc: linux-staging, kernel, greybus-dev, linux-media, linux-arm-kernel,
	Fabio Estevam, NXP Linux Team, Jerome Brunet, Martin Blumenstingl,
	linux-amlogic, linux-rockchip, linux-sunxi, ac100, linux-tegra,
	Broadcom internal kernel review list, linux-rpi-kernel

Hello,

this series adapts the platform drivers below drivers/staging to use the
.remove_new() callback. Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver
core doesn't (and cannot) cope for errors during remove. The only effect
of a non-zero return value in .remove() is that the driver core emits a
warning. The device is removed anyhow and an early return from .remove()
usually yields a resource leak.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later.

All drivers in staging already return zero in their remove callback, so
they can be trivially converted.

The changes to the individual drivers are all orthogonal. If I need to
resend some patches because of some review feedback, I'd like to only
send the patches that actually needed changes, so please pick up the
remaining patches that don't need changing to reduce the amount of mail.

Best regards
Uwe

Uwe Kleine-König (24):
  staging: axis-fifo: Convert to platform remove callback returning void
  staging: emxx_udc: Convert to platform remove callback returning void
  staging: fieldbus: arcx-anybus: Convert to platform remove callback
    returning void
  staging: greybus: arche-apb-ctrl: Convert to platform remove callback
    returning void
  staging: greybus: arche: Convert to platform remove callback returning
    void
  staging: media: atmel-sama5d2-isc: Convert to platform remove callback
    returning void
  staging: media: atmel-sama7g5-isc: Convert to platform remove callback
    returning void
  staging: media: imx-media-csi: Convert to platform remove callback
    returning void
  staging: media: imx-media-dev: Convert to platform remove callback
    returning void
  staging: media: imx6-mipi-csi2: Convert to platform remove callback
    returning void
  staging: media: imx8mq-mipi-csi2: Convert to platform remove callback
    returning void
  staging: media: meson: vdec: Convert to platform remove callback
    returning void
  staging: media: omap4iss: Convert to platform remove callback
    returning void
  staging: media: rkvdec: Convert to platform remove callback returning
    void
  staging: media: sunxi: cedrus: Convert to platform remove callback
    returning void
  staging: media: sun6i-isp: Convert to platform remove callback
    returning void
  staging: most: dim2: Convert to platform remove callback returning
    void
  staging: nvec: Convert to platform remove callback returning void
  staging: nvec: nvec_kbd: Convert to platform remove callback returning
    void
  staging: nvec_power: Convert to platform remove callback returning
    void
  staging: nvec_ps2: Convert to platform remove callback returning void
  staging: octeon: ethernet: Convert to platform remove callback
    returning void
  staging: vc04_services: bcm2835-camera: Convert to platform remove
    callback returning void
  staging: vc04_services: vchiq_arm: Convert to platform remove callback
    returning void

 drivers/staging/axis-fifo/axis-fifo.c                       | 6 ++----
 drivers/staging/emxx_udc/emxx_udc.c                         | 6 ++----
 drivers/staging/fieldbus/anybuss/arcx-anybus.c              | 5 ++---
 drivers/staging/greybus/arche-apb-ctrl.c                    | 6 ++----
 drivers/staging/greybus/arche-platform.c                    | 6 ++----
 drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c  | 6 ++----
 drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c  | 6 ++----
 drivers/staging/media/imx/imx-media-csi.c                   | 6 ++----
 drivers/staging/media/imx/imx-media-dev.c                   | 6 ++----
 drivers/staging/media/imx/imx6-mipi-csi2.c                  | 6 ++----
 drivers/staging/media/imx/imx8mq-mipi-csi2.c                | 6 ++----
 drivers/staging/media/meson/vdec/vdec.c                     | 6 ++----
 drivers/staging/media/omap4iss/iss.c                        | 6 ++----
 drivers/staging/media/rkvdec/rkvdec.c                       | 5 ++---
 drivers/staging/media/sunxi/cedrus/cedrus.c                 | 6 ++----
 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c           | 6 ++----
 drivers/staging/most/dim2/dim2.c                            | 6 ++----
 drivers/staging/nvec/nvec.c                                 | 6 ++----
 drivers/staging/nvec/nvec_kbd.c                             | 6 ++----
 drivers/staging/nvec/nvec_power.c                           | 6 ++----
 drivers/staging/nvec/nvec_ps2.c                             | 6 ++----
 drivers/staging/octeon/ethernet.c                           | 5 ++---
 .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c   | 6 ++----
 .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c   | 6 ++----
 24 files changed, 48 insertions(+), 93 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


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

* [PATCH 15/24] staging: media: sunxi: cedrus: Convert to platform remove callback returning void
  2023-04-03 15:39 [PATCH 00/24] staging: Convert to platform remove callback returning void Uwe Kleine-König
@ 2023-04-03 15:40 ` Uwe Kleine-König
  2023-04-04  8:47   ` Paul Kocialkowski
  2023-04-04 16:53   ` Jernej Škrabec
  2023-04-03 15:40 ` [PATCH 16/24] staging: media: sun6i-isp: " Uwe Kleine-König
  2023-04-03 19:50 ` [PATCH 00/24] staging: " Greg Kroah-Hartman
  2 siblings, 2 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-04-03 15:40 UTC (permalink / raw)
  To: Maxime Ripard, Paul Kocialkowski, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-staging, linux-arm-kernel, linux-sunxi, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

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

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

diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
index a43d5ff66716..3c62376c3e94 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
@@ -543,7 +543,7 @@ static int cedrus_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int cedrus_remove(struct platform_device *pdev)
+static void cedrus_remove(struct platform_device *pdev)
 {
 	struct cedrus_dev *dev = platform_get_drvdata(pdev);
 
@@ -558,8 +558,6 @@ static int cedrus_remove(struct platform_device *pdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	cedrus_hw_remove(dev);
-
-	return 0;
 }
 
 static const struct cedrus_variant sun4i_a10_cedrus_variant = {
@@ -706,7 +704,7 @@ static const struct dev_pm_ops cedrus_dev_pm_ops = {
 
 static struct platform_driver cedrus_driver = {
 	.probe		= cedrus_probe,
-	.remove		= cedrus_remove,
+	.remove_new	= cedrus_remove,
 	.driver		= {
 		.name		= CEDRUS_NAME,
 		.of_match_table	= of_match_ptr(cedrus_dt_match),
-- 
2.39.2


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

* [PATCH 16/24] staging: media: sun6i-isp: Convert to platform remove callback returning void
  2023-04-03 15:39 [PATCH 00/24] staging: Convert to platform remove callback returning void Uwe Kleine-König
  2023-04-03 15:40 ` [PATCH 15/24] staging: media: sunxi: cedrus: " Uwe Kleine-König
@ 2023-04-03 15:40 ` Uwe Kleine-König
  2023-04-04  8:47   ` Paul Kocialkowski
  2023-04-04 16:54   ` Jernej Škrabec
  2023-04-03 19:50 ` [PATCH 00/24] staging: " Greg Kroah-Hartman
  2 siblings, 2 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2023-04-03 15:40 UTC (permalink / raw)
  To: Paul Kocialkowski, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: linux-media, linux-staging, linux-arm-kernel, linux-sunxi, kernel

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

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

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

diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
index 7b7947509b69..0dc75adbd9d8 100644
--- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
+++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
@@ -493,7 +493,7 @@ static int sun6i_isp_probe(struct platform_device *platform_dev)
 	return ret;
 }
 
-static int sun6i_isp_remove(struct platform_device *platform_dev)
+static void sun6i_isp_remove(struct platform_device *platform_dev)
 {
 	struct sun6i_isp_device *isp_dev = platform_get_drvdata(platform_dev);
 
@@ -503,8 +503,6 @@ static int sun6i_isp_remove(struct platform_device *platform_dev)
 	sun6i_isp_v4l2_cleanup(isp_dev);
 	sun6i_isp_tables_cleanup(isp_dev);
 	sun6i_isp_resources_cleanup(isp_dev);
-
-	return 0;
 }
 
 /*
@@ -540,7 +538,7 @@ MODULE_DEVICE_TABLE(of, sun6i_isp_of_match);
 
 static struct platform_driver sun6i_isp_platform_driver = {
 	.probe	= sun6i_isp_probe,
-	.remove	= sun6i_isp_remove,
+	.remove_new = sun6i_isp_remove,
 	.driver	= {
 		.name		= SUN6I_ISP_NAME,
 		.of_match_table	= of_match_ptr(sun6i_isp_of_match),
-- 
2.39.2


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

* Re: [PATCH 00/24] staging: Convert to platform remove callback returning void
  2023-04-03 15:39 [PATCH 00/24] staging: Convert to platform remove callback returning void Uwe Kleine-König
  2023-04-03 15:40 ` [PATCH 15/24] staging: media: sunxi: cedrus: " Uwe Kleine-König
  2023-04-03 15:40 ` [PATCH 16/24] staging: media: sun6i-isp: " Uwe Kleine-König
@ 2023-04-03 19:50 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-04-03 19:50 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Deepak R Varma, Yuan Can, Simon Horman, Sven Van Asbroeck,
	Vaibhav Hiremath, Johan Hovold, Alex Elder, Eugen Hristev,
	Mauro Carvalho Chehab, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, Steve Longerbeam, Philipp Zabel, Shawn Guo,
	Sascha Hauer, Neil Armstrong, Kevin Hilman, Laurent Pinchart,
	Ezequiel Garcia, Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Parthiban Veerasooran,
	Christian Gromm, Davidlohr Bueso, Marc Dietrich, Florian Fainelli,
	Ray Jui, Scott Branden, Umang Jain, Andy Shevchenko,
	Adrien Thierry, Stefan Wahren, Fabio M. De Francesco, Phil Elwell,
	Jakob Koschel, linux-staging, kernel, greybus-dev, linux-media,
	linux-arm-kernel, Fabio Estevam, NXP Linux Team, Jerome Brunet,
	Martin Blumenstingl, linux-amlogic, linux-rockchip, linux-sunxi,
	ac100, linux-tegra, Broadcom internal kernel review list,
	linux-rpi-kernel

On Mon, Apr 03, 2023 at 05:39:50PM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> this series adapts the platform drivers below drivers/staging to use the
> .remove_new() callback. Compared to the traditional .remove() callback
> .remove_new() returns no value. This is a good thing because the driver
> core doesn't (and cannot) cope for errors during remove. The only effect
> of a non-zero return value in .remove() is that the driver core emits a
> warning. The device is removed anyhow and an early return from .remove()
> usually yields a resource leak.
> 
> By changing the remove callback to return void driver authors cannot
> reasonably assume any more that there is some kind of cleanup later.
> 
> All drivers in staging already return zero in their remove callback, so
> they can be trivially converted.
> 
> The changes to the individual drivers are all orthogonal. If I need to
> resend some patches because of some review feedback, I'd like to only
> send the patches that actually needed changes, so please pick up the
> remaining patches that don't need changing to reduce the amount of mail.

Note, I can't take drivers/staging/media/ patches, those go through the
v4l maintainer's tree.  So I've taken the non-media patches from this
series now.

thanks,

greg k-h

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

* Re: [PATCH 15/24] staging: media: sunxi: cedrus: Convert to platform remove callback returning void
  2023-04-03 15:40 ` [PATCH 15/24] staging: media: sunxi: cedrus: " Uwe Kleine-König
@ 2023-04-04  8:47   ` Paul Kocialkowski
  2023-04-04 16:53   ` Jernej Škrabec
  1 sibling, 0 replies; 8+ messages in thread
From: Paul Kocialkowski @ 2023-04-04  8:47 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Maxime Ripard, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-media,
	linux-staging, linux-arm-kernel, linux-sunxi, kernel

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

Hi,

On Mon 03 Apr 23, 17:40, 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 (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Thanks,

Paul

> ---
>  drivers/staging/media/sunxi/cedrus/cedrus.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
> index a43d5ff66716..3c62376c3e94 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus.c
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
> @@ -543,7 +543,7 @@ static int cedrus_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static int cedrus_remove(struct platform_device *pdev)
> +static void cedrus_remove(struct platform_device *pdev)
>  {
>  	struct cedrus_dev *dev = platform_get_drvdata(pdev);
>  
> @@ -558,8 +558,6 @@ static int cedrus_remove(struct platform_device *pdev)
>  	v4l2_device_unregister(&dev->v4l2_dev);
>  
>  	cedrus_hw_remove(dev);
> -
> -	return 0;
>  }
>  
>  static const struct cedrus_variant sun4i_a10_cedrus_variant = {
> @@ -706,7 +704,7 @@ static const struct dev_pm_ops cedrus_dev_pm_ops = {
>  
>  static struct platform_driver cedrus_driver = {
>  	.probe		= cedrus_probe,
> -	.remove		= cedrus_remove,
> +	.remove_new	= cedrus_remove,
>  	.driver		= {
>  		.name		= CEDRUS_NAME,
>  		.of_match_table	= of_match_ptr(cedrus_dt_match),
> -- 
> 2.39.2
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

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

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

* Re: [PATCH 16/24] staging: media: sun6i-isp: Convert to platform remove callback returning void
  2023-04-03 15:40 ` [PATCH 16/24] staging: media: sun6i-isp: " Uwe Kleine-König
@ 2023-04-04  8:47   ` Paul Kocialkowski
  2023-04-04 16:54   ` Jernej Škrabec
  1 sibling, 0 replies; 8+ messages in thread
From: Paul Kocialkowski @ 2023-04-04  8:47 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, linux-media, linux-staging,
	linux-arm-kernel, linux-sunxi, kernel

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

Hi,

On Mon 03 Apr 23, 17:40, 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 (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Thanks,

Paul

> ---
>  drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
> index 7b7947509b69..0dc75adbd9d8 100644
> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
> @@ -493,7 +493,7 @@ static int sun6i_isp_probe(struct platform_device *platform_dev)
>  	return ret;
>  }
>  
> -static int sun6i_isp_remove(struct platform_device *platform_dev)
> +static void sun6i_isp_remove(struct platform_device *platform_dev)
>  {
>  	struct sun6i_isp_device *isp_dev = platform_get_drvdata(platform_dev);
>  
> @@ -503,8 +503,6 @@ static int sun6i_isp_remove(struct platform_device *platform_dev)
>  	sun6i_isp_v4l2_cleanup(isp_dev);
>  	sun6i_isp_tables_cleanup(isp_dev);
>  	sun6i_isp_resources_cleanup(isp_dev);
> -
> -	return 0;
>  }
>  
>  /*
> @@ -540,7 +538,7 @@ MODULE_DEVICE_TABLE(of, sun6i_isp_of_match);
>  
>  static struct platform_driver sun6i_isp_platform_driver = {
>  	.probe	= sun6i_isp_probe,
> -	.remove	= sun6i_isp_remove,
> +	.remove_new = sun6i_isp_remove,
>  	.driver	= {
>  		.name		= SUN6I_ISP_NAME,
>  		.of_match_table	= of_match_ptr(sun6i_isp_of_match),
> -- 
> 2.39.2
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

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

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

* Re: [PATCH 15/24] staging: media: sunxi: cedrus: Convert to platform remove callback returning void
  2023-04-03 15:40 ` [PATCH 15/24] staging: media: sunxi: cedrus: " Uwe Kleine-König
  2023-04-04  8:47   ` Paul Kocialkowski
@ 2023-04-04 16:53   ` Jernej Škrabec
  1 sibling, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2023-04-04 16:53 UTC (permalink / raw)
  To: Maxime Ripard, Paul Kocialkowski, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Chen-Yu Tsai, Samuel Holland,
	Uwe Kleine-König
  Cc: linux-media, linux-staging, linux-arm-kernel, linux-sunxi, kernel

Dne ponedeljek, 03. april 2023 ob 17:40:05 CEST je Uwe Kleine-König 
napisal(a):
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

Best regards,
Jernej



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

* Re: [PATCH 16/24] staging: media: sun6i-isp: Convert to platform remove callback returning void
  2023-04-03 15:40 ` [PATCH 16/24] staging: media: sun6i-isp: " Uwe Kleine-König
  2023-04-04  8:47   ` Paul Kocialkowski
@ 2023-04-04 16:54   ` Jernej Škrabec
  1 sibling, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2023-04-04 16:54 UTC (permalink / raw)
  To: Paul Kocialkowski, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Chen-Yu Tsai, Samuel Holland, Uwe Kleine-König
  Cc: linux-media, linux-staging, linux-arm-kernel, linux-sunxi, kernel

Dne ponedeljek, 03. april 2023 ob 17:40:06 CEST je Uwe Kleine-König 
napisal(a):
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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

Best regards,
Jernej



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

end of thread, other threads:[~2023-04-04 16:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-03 15:39 [PATCH 00/24] staging: Convert to platform remove callback returning void Uwe Kleine-König
2023-04-03 15:40 ` [PATCH 15/24] staging: media: sunxi: cedrus: " Uwe Kleine-König
2023-04-04  8:47   ` Paul Kocialkowski
2023-04-04 16:53   ` Jernej Škrabec
2023-04-03 15:40 ` [PATCH 16/24] staging: media: sun6i-isp: " Uwe Kleine-König
2023-04-04  8:47   ` Paul Kocialkowski
2023-04-04 16:54   ` Jernej Škrabec
2023-04-03 19:50 ` [PATCH 00/24] staging: " Greg Kroah-Hartman

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