All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c: dw9714: Return zero in remove callback
@ 2022-03-31 13:31 Uwe Kleine-König
  2022-04-25 19:13 ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2022-03-31 13:31 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab; +Cc: linux-media, kernel

The only effect of returning an error code in an i2c remove callback is
that the i2c core emits a generic warning and still removes the device.

So even if disabling the regulator fails it's sensible to further cleanup
and then return zero to only emit a single error message.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/i2c/dw9714.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
index cd7008ad8f2f..982ed8afebf5 100644
--- a/drivers/media/i2c/dw9714.c
+++ b/drivers/media/i2c/dw9714.c
@@ -201,7 +201,6 @@ static int dw9714_remove(struct i2c_client *client)
 		if (ret) {
 			dev_err(&client->dev,
 				"Failed to disable vcc: %d\n", ret);
-			return ret;
 		}
 	}
 	pm_runtime_set_suspended(&client->dev);
-- 
2.35.1


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

* Re: [PATCH] media: i2c: dw9714: Return zero in remove callback
  2022-03-31 13:31 [PATCH] media: i2c: dw9714: Return zero in remove callback Uwe Kleine-König
@ 2022-04-25 19:13 ` Uwe Kleine-König
  2022-04-26  8:18   ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2022-04-25 19:13 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab; +Cc: kernel, linux-media

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

Hello,

On Thu, Mar 31, 2022 at 03:31:32PM +0200, Uwe Kleine-König wrote:
> The only effect of returning an error code in an i2c remove callback is
> that the i2c core emits a generic warning and still removes the device.
> 
> So even if disabling the regulator fails it's sensible to further cleanup
> and then return zero to only emit a single error message.
> 
> This patch is a preparation for making i2c remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/media/i2c/dw9714.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> index cd7008ad8f2f..982ed8afebf5 100644
> --- a/drivers/media/i2c/dw9714.c
> +++ b/drivers/media/i2c/dw9714.c
> @@ -201,7 +201,6 @@ static int dw9714_remove(struct i2c_client *client)
>  		if (ret) {
>  			dev_err(&client->dev,
>  				"Failed to disable vcc: %d\n", ret);
> -			return ret;
>  		}
>  	}
>  	pm_runtime_set_suspended(&client->dev);

Who cares for this driver and so for 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] 5+ messages in thread

* Re: [PATCH] media: i2c: dw9714: Return zero in remove callback
  2022-04-25 19:13 ` Uwe Kleine-König
@ 2022-04-26  8:18   ` Sakari Ailus
  2022-04-26  9:02     ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2022-04-26  8:18 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Mauro Carvalho Chehab, kernel, linux-media

Hi Uwe,

On Mon, Apr 25, 2022 at 09:13:45PM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> On Thu, Mar 31, 2022 at 03:31:32PM +0200, Uwe Kleine-König wrote:
> > The only effect of returning an error code in an i2c remove callback is
> > that the i2c core emits a generic warning and still removes the device.
> > 
> > So even if disabling the regulator fails it's sensible to further cleanup
> > and then return zero to only emit a single error message.
> > 
> > This patch is a preparation for making i2c remove callbacks return void.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/media/i2c/dw9714.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> > index cd7008ad8f2f..982ed8afebf5 100644
> > --- a/drivers/media/i2c/dw9714.c
> > +++ b/drivers/media/i2c/dw9714.c
> > @@ -201,7 +201,6 @@ static int dw9714_remove(struct i2c_client *client)
> >  		if (ret) {
> >  			dev_err(&client->dev,
> >  				"Failed to disable vcc: %d\n", ret);
> > -			return ret;
> >  		}
> >  	}
> >  	pm_runtime_set_suspended(&client->dev);
> 
> Who cares for this driver and so for this patch?

I do.

The patch is in the media stage tree now (you should have received an
e-mail about it) from where it eventually gets to the media tree.

-- 
Kind regards,

Sakari Ailus

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

* Re: [PATCH] media: i2c: dw9714: Return zero in remove callback
  2022-04-26  8:18   ` Sakari Ailus
@ 2022-04-26  9:02     ` Uwe Kleine-König
  2022-04-27  6:15       ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2022-04-26  9:02 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Mauro Carvalho Chehab, kernel, linux-media

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

On Tue, Apr 26, 2022 at 11:18:45AM +0300, Sakari Ailus wrote:
> Hi Uwe,
> 
> On Mon, Apr 25, 2022 at 09:13:45PM +0200, Uwe Kleine-König wrote:
> > Hello,
> > 
> > On Thu, Mar 31, 2022 at 03:31:32PM +0200, Uwe Kleine-König wrote:
> > > The only effect of returning an error code in an i2c remove callback is
> > > that the i2c core emits a generic warning and still removes the device.
> > > 
> > > So even if disabling the regulator fails it's sensible to further cleanup
> > > and then return zero to only emit a single error message.
> > > 
> > > This patch is a preparation for making i2c remove callbacks return void.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  drivers/media/i2c/dw9714.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> > > index cd7008ad8f2f..982ed8afebf5 100644
> > > --- a/drivers/media/i2c/dw9714.c
> > > +++ b/drivers/media/i2c/dw9714.c
> > > @@ -201,7 +201,6 @@ static int dw9714_remove(struct i2c_client *client)
> > >  		if (ret) {
> > >  			dev_err(&client->dev,
> > >  				"Failed to disable vcc: %d\n", ret);
> > > -			return ret;
> > >  		}
> > >  	}
> > >  	pm_runtime_set_suspended(&client->dev);
> > 
> > Who cares for this driver and so for this patch?
> 
> I do.
> 
> The patch is in the media stage tree now (you should have received an
> e-mail about it) from where it eventually gets to the media tree.

Ah I did. I wasn't aware of it, because the mail doesn't have the
in-reply-to header set such that my MUA doesn't sort it to the patch
mail.

I saw this mail now. Let me note that it's intransparent for me how your
Sob line was added to the patch. The mail says the patch was queued,
does that mean it's about to be applied and will appear in next soon? Or
is it only queued to be looked at? (I assume the former.)

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

* Re: [PATCH] media: i2c: dw9714: Return zero in remove callback
  2022-04-26  9:02     ` Uwe Kleine-König
@ 2022-04-27  6:15       ` Sakari Ailus
  0 siblings, 0 replies; 5+ messages in thread
From: Sakari Ailus @ 2022-04-27  6:15 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Mauro Carvalho Chehab, kernel, linux-media

On Tue, Apr 26, 2022 at 11:02:55AM +0200, Uwe Kleine-König wrote:
> On Tue, Apr 26, 2022 at 11:18:45AM +0300, Sakari Ailus wrote:
> > Hi Uwe,
> > 
> > On Mon, Apr 25, 2022 at 09:13:45PM +0200, Uwe Kleine-König wrote:
> > > Hello,
> > > 
> > > On Thu, Mar 31, 2022 at 03:31:32PM +0200, Uwe Kleine-König wrote:
> > > > The only effect of returning an error code in an i2c remove callback is
> > > > that the i2c core emits a generic warning and still removes the device.
> > > > 
> > > > So even if disabling the regulator fails it's sensible to further cleanup
> > > > and then return zero to only emit a single error message.
> > > > 
> > > > This patch is a preparation for making i2c remove callbacks return void.
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > ---
> > > >  drivers/media/i2c/dw9714.c | 1 -
> > > >  1 file changed, 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> > > > index cd7008ad8f2f..982ed8afebf5 100644
> > > > --- a/drivers/media/i2c/dw9714.c
> > > > +++ b/drivers/media/i2c/dw9714.c
> > > > @@ -201,7 +201,6 @@ static int dw9714_remove(struct i2c_client *client)
> > > >  		if (ret) {
> > > >  			dev_err(&client->dev,
> > > >  				"Failed to disable vcc: %d\n", ret);
> > > > -			return ret;
> > > >  		}
> > > >  	}
> > > >  	pm_runtime_set_suspended(&client->dev);
> > > 
> > > Who cares for this driver and so for this patch?
> > 
> > I do.
> > 
> > The patch is in the media stage tree now (you should have received an
> > e-mail about it) from where it eventually gets to the media tree.
> 
> Ah I did. I wasn't aware of it, because the mail doesn't have the
> in-reply-to header set such that my MUA doesn't sort it to the patch
> mail.

The mail is not sent to the LMML, but the submitter (as others whose
addresses can be found in git tags) and another list. This would still
allow to connect the two. This is up to Mauro's scripts.

> 
> I saw this mail now. Let me note that it's intransparent for me how your
> Sob line was added to the patch. The mail says the patch was queued,
> does that mean it's about to be applied and will appear in next soon? Or
> is it only queued to be looked at? (I assume the former.)

The media submaintainer trees --- such as mine --- are not pulled to the
media tree. Instead Mauro picks the patches to the media tree individually.

My tree is here:

<URL:https://git.linuxtv.org/sailus/media_tree.git/>

-- 
Sakari Ailus

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

end of thread, other threads:[~2022-04-27  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 13:31 [PATCH] media: i2c: dw9714: Return zero in remove callback Uwe Kleine-König
2022-04-25 19:13 ` Uwe Kleine-König
2022-04-26  8:18   ` Sakari Ailus
2022-04-26  9:02     ` Uwe Kleine-König
2022-04-27  6:15       ` Sakari Ailus

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.