dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: tfp410: Make tfp410_fini() return void
@ 2022-04-28 16:28 Uwe Kleine-König
  2022-04-28 18:08 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2022-04-28 16:28 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss
  Cc: kernel, dri-devel, Laurent Pinchart, Jernej Skrabec, Jonas Karlman

tfp410_fini() always returns zero. Make it return no value which makes it
easier to see in the callers that there is no error to handle.

Also the return value of i2c and platform driver remove callbacks is
ignored anyway. This prepares making i2c and platform remove callbacks
return void, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpu/drm/bridge/ti-tfp410.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index ba3fa2a9b8a4..756b3e6e776b 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -341,13 +341,11 @@ static int tfp410_init(struct device *dev, bool i2c)
 	return 0;
 }
 
-static int tfp410_fini(struct device *dev)
+static void tfp410_fini(struct device *dev)
 {
 	struct tfp410 *dvi = dev_get_drvdata(dev);
 
 	drm_bridge_remove(&dvi->bridge);
-
-	return 0;
 }
 
 static int tfp410_probe(struct platform_device *pdev)
@@ -357,7 +355,9 @@ static int tfp410_probe(struct platform_device *pdev)
 
 static int tfp410_remove(struct platform_device *pdev)
 {
-	return tfp410_fini(&pdev->dev);
+	tfp410_fini(&pdev->dev);
+
+	return 0;
 }
 
 static const struct of_device_id tfp410_match[] = {
@@ -394,7 +394,9 @@ static int tfp410_i2c_probe(struct i2c_client *client,
 
 static int tfp410_i2c_remove(struct i2c_client *client)
 {
-	return tfp410_fini(&client->dev);
+	tfp410_fini(&client->dev);
+
+	return 0;
 }
 
 static const struct i2c_device_id tfp410_i2c_ids[] = {

base-commit: 3123109284176b1532874591f7c81f3837bbdc17
-- 
2.35.1


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

* Re: [PATCH] drm/bridge: tfp410: Make tfp410_fini() return void
  2022-04-28 16:28 [PATCH] drm/bridge: tfp410: Make tfp410_fini() return void Uwe Kleine-König
@ 2022-04-28 18:08 ` Laurent Pinchart
  2022-05-02 14:52   ` Robert Foss
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2022-04-28 18:08 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: kernel, Jonas Karlman, Robert Foss, Neil Armstrong, dri-devel,
	Jernej Skrabec, Andrzej Hajda

Hi Uwe,

Thank you for the patch.

On Thu, Apr 28, 2022 at 06:28:03PM +0200, Uwe Kleine-König wrote:
> tfp410_fini() always returns zero. Make it return no value which makes it
> easier to see in the callers that there is no error to handle.
> 
> Also the return value of i2c and platform driver remove callbacks is
> ignored anyway. This prepares making i2c and platform remove callbacks
> return void, too.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/bridge/ti-tfp410.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> index ba3fa2a9b8a4..756b3e6e776b 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -341,13 +341,11 @@ static int tfp410_init(struct device *dev, bool i2c)
>  	return 0;
>  }
>  
> -static int tfp410_fini(struct device *dev)
> +static void tfp410_fini(struct device *dev)
>  {
>  	struct tfp410 *dvi = dev_get_drvdata(dev);
>  
>  	drm_bridge_remove(&dvi->bridge);
> -
> -	return 0;
>  }
>  
>  static int tfp410_probe(struct platform_device *pdev)
> @@ -357,7 +355,9 @@ static int tfp410_probe(struct platform_device *pdev)
>  
>  static int tfp410_remove(struct platform_device *pdev)
>  {
> -	return tfp410_fini(&pdev->dev);
> +	tfp410_fini(&pdev->dev);
> +
> +	return 0;
>  }
>  
>  static const struct of_device_id tfp410_match[] = {
> @@ -394,7 +394,9 @@ static int tfp410_i2c_probe(struct i2c_client *client,
>  
>  static int tfp410_i2c_remove(struct i2c_client *client)
>  {
> -	return tfp410_fini(&client->dev);
> +	tfp410_fini(&client->dev);
> +
> +	return 0;
>  }
>  
>  static const struct i2c_device_id tfp410_i2c_ids[] = {
> 
> base-commit: 3123109284176b1532874591f7c81f3837bbdc17

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH] drm/bridge: tfp410: Make tfp410_fini() return void
  2022-04-28 18:08 ` Laurent Pinchart
@ 2022-05-02 14:52   ` Robert Foss
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Foss @ 2022-05-02 14:52 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: kernel, Jonas Karlman, Neil Armstrong, dri-devel, Jernej Skrabec,
	Andrzej Hajda, Uwe Kleine-König

On Thu, 28 Apr 2022 at 20:08, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Uwe,
>
> Thank you for the patch.
>
> On Thu, Apr 28, 2022 at 06:28:03PM +0200, Uwe Kleine-König wrote:
> > tfp410_fini() always returns zero. Make it return no value which makes it
> > easier to see in the callers that there is no error to handle.
> >
> > Also the return value of i2c and platform driver remove callbacks is
> > ignored anyway. This prepares making i2c and platform remove callbacks
> > return void, too.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > ---
> >  drivers/gpu/drm/bridge/ti-tfp410.c | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> > index ba3fa2a9b8a4..756b3e6e776b 100644
> > --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> > +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> > @@ -341,13 +341,11 @@ static int tfp410_init(struct device *dev, bool i2c)
> >       return 0;
> >  }
> >
> > -static int tfp410_fini(struct device *dev)
> > +static void tfp410_fini(struct device *dev)
> >  {
> >       struct tfp410 *dvi = dev_get_drvdata(dev);
> >
> >       drm_bridge_remove(&dvi->bridge);
> > -
> > -     return 0;
> >  }
> >
> >  static int tfp410_probe(struct platform_device *pdev)
> > @@ -357,7 +355,9 @@ static int tfp410_probe(struct platform_device *pdev)
> >
> >  static int tfp410_remove(struct platform_device *pdev)
> >  {
> > -     return tfp410_fini(&pdev->dev);
> > +     tfp410_fini(&pdev->dev);
> > +
> > +     return 0;
> >  }
> >
> >  static const struct of_device_id tfp410_match[] = {
> > @@ -394,7 +394,9 @@ static int tfp410_i2c_probe(struct i2c_client *client,
> >
> >  static int tfp410_i2c_remove(struct i2c_client *client)
> >  {
> > -     return tfp410_fini(&client->dev);
> > +     tfp410_fini(&client->dev);
> > +
> > +     return 0;
> >  }
> >
> >  static const struct i2c_device_id tfp410_i2c_ids[] = {
> >
> > base-commit: 3123109284176b1532874591f7c81f3837bbdc17
>
> --
> Regards,
>
> Laurent Pinchart

Applied to drm-misc-next.

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

end of thread, other threads:[~2022-05-02 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 16:28 [PATCH] drm/bridge: tfp410: Make tfp410_fini() return void Uwe Kleine-König
2022-04-28 18:08 ` Laurent Pinchart
2022-05-02 14:52   ` Robert Foss

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).