dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make xilinxfb_release() return void
@ 2022-10-19 13:24 Uwe Kleine-König
  2022-10-19 20:23 ` Uwe Kleine-König
  2022-10-20  6:37 ` Helge Deller
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2022-10-19 13:24 UTC (permalink / raw)
  To: Helge Deller, Michal Simek
  Cc: linux-arm-kernel, linux-fbdev, kernel, dri-devel

The function xilinxfb_release() returns zero unconditionally. Make it
return void. There is no semantic change, the only effect is that it
becomes obvious that the driver's .remove() callback always returns zero.

This is a preparation for making platform remove callbacks return void.

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

diff --git a/drivers/video/fbdev/xilinxfb.c b/drivers/video/fbdev/xilinxfb.c
index 438e2c78142f..1ac83900a21c 100644
--- a/drivers/video/fbdev/xilinxfb.c
+++ b/drivers/video/fbdev/xilinxfb.c
@@ -376,7 +376,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
 	return rc;
 }
 
-static int xilinxfb_release(struct device *dev)
+static void xilinxfb_release(struct device *dev)
 {
 	struct xilinxfb_drvdata *drvdata = dev_get_drvdata(dev);
 
@@ -402,8 +402,6 @@ static int xilinxfb_release(struct device *dev)
 	if (!(drvdata->flags & BUS_ACCESS_FLAG))
 		dcr_unmap(drvdata->dcr_host, drvdata->dcr_len);
 #endif
-
-	return 0;
 }
 
 /* ---------------------------------------------------------------------
@@ -480,7 +478,9 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
 
 static int xilinxfb_of_remove(struct platform_device *op)
 {
-	return xilinxfb_release(&op->dev);
+	xilinxfb_release(&op->dev);
+
+	return 0;
 }
 
 /* Match table for of_platform binding */

base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780
-- 
2.37.2


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

* Re: [PATCH] Make xilinxfb_release() return void
  2022-10-19 13:24 [PATCH] Make xilinxfb_release() return void Uwe Kleine-König
@ 2022-10-19 20:23 ` Uwe Kleine-König
  2022-10-20  6:37 ` Helge Deller
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2022-10-19 20:23 UTC (permalink / raw)
  To: Helge Deller, Michal Simek
  Cc: dri-devel, linux-fbdev, kernel, linux-arm-kernel

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

Hello,

I failed to add a proper subject prefix. "fbdev: xilinxfb: " would have
been a good choice. I can resend, but I wouldn't say no if you are
willing to fixup while applying this patch :-)

Best regards
Uwe

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

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

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

* Re: [PATCH] Make xilinxfb_release() return void
  2022-10-19 13:24 [PATCH] Make xilinxfb_release() return void Uwe Kleine-König
  2022-10-19 20:23 ` Uwe Kleine-König
@ 2022-10-20  6:37 ` Helge Deller
  1 sibling, 0 replies; 3+ messages in thread
From: Helge Deller @ 2022-10-20  6:37 UTC (permalink / raw)
  To: Uwe Kleine-König, Michal Simek
  Cc: linux-arm-kernel, linux-fbdev, kernel, dri-devel

On 10/19/22 15:24, Uwe Kleine-König wrote:
> The function xilinxfb_release() returns zero unconditionally. Make it
> return void. There is no semantic change, the only effect is that it
> becomes obvious that the driver's .remove() callback always returns zero.
>
> This is a preparation for making platform remove callbacks return void.
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

applied, with the subject adjusted.

Thanks,
Helge


> ---
>   drivers/video/fbdev/xilinxfb.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/video/fbdev/xilinxfb.c b/drivers/video/fbdev/xilinxfb.c
> index 438e2c78142f..1ac83900a21c 100644
> --- a/drivers/video/fbdev/xilinxfb.c
> +++ b/drivers/video/fbdev/xilinxfb.c
> @@ -376,7 +376,7 @@ static int xilinxfb_assign(struct platform_device *pdev,
>   	return rc;
>   }
>
> -static int xilinxfb_release(struct device *dev)
> +static void xilinxfb_release(struct device *dev)
>   {
>   	struct xilinxfb_drvdata *drvdata = dev_get_drvdata(dev);
>
> @@ -402,8 +402,6 @@ static int xilinxfb_release(struct device *dev)
>   	if (!(drvdata->flags & BUS_ACCESS_FLAG))
>   		dcr_unmap(drvdata->dcr_host, drvdata->dcr_len);
>   #endif
> -
> -	return 0;
>   }
>
>   /* ---------------------------------------------------------------------
> @@ -480,7 +478,9 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
>
>   static int xilinxfb_of_remove(struct platform_device *op)
>   {
> -	return xilinxfb_release(&op->dev);
> +	xilinxfb_release(&op->dev);
> +
> +	return 0;
>   }
>
>   /* Match table for of_platform binding */
>
> base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780


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

end of thread, other threads:[~2022-10-20  6:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-19 13:24 [PATCH] Make xilinxfb_release() return void Uwe Kleine-König
2022-10-19 20:23 ` Uwe Kleine-König
2022-10-20  6:37 ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).