All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
@ 2020-10-06 20:29 ` Leonid Kushnir
  0 siblings, 0 replies; 7+ messages in thread
From: Leonid Kushnir @ 2020-10-06 20:29 UTC (permalink / raw)
  Cc: mchehab, sakari.ailus, gregkh, leonf008, linux-media, devel,
	linux-kernel

This patch fixes check of a result of 'power_up()' function call in
function 'gc0310_s_power()' to do "error handling" instead of "success
handling" as Dan Carpenter noted in his comment on the previous patch.
Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct
value of 'ret' is checked in IF statement now.

Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index 8201c15b5769..d170d0adfea4 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -874,11 +874,12 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)
 
 	if (on == 0)
 		return power_down(sd);
+
 	ret = power_up(sd);
-	if (!ret)
-		return gc0310_init(sd);
+	if (ret)
+		return ret;
 
-	return ret;
+	return gc0310_init(sd);
 }
 
 /*
-- 
2.25.1


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

* [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
@ 2020-10-06 20:29 ` Leonid Kushnir
  0 siblings, 0 replies; 7+ messages in thread
From: Leonid Kushnir @ 2020-10-06 20:29 UTC (permalink / raw)
  Cc: devel, gregkh, linux-kernel, sakari.ailus, mchehab, leonf008,
	linux-media

This patch fixes check of a result of 'power_up()' function call in
function 'gc0310_s_power()' to do "error handling" instead of "success
handling" as Dan Carpenter noted in his comment on the previous patch.
Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct
value of 'ret' is checked in IF statement now.

Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
index 8201c15b5769..d170d0adfea4 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
@@ -874,11 +874,12 @@ static int gc0310_s_power(struct v4l2_subdev *sd, int on)
 
 	if (on == 0)
 		return power_down(sd);
+
 	ret = power_up(sd);
-	if (!ret)
-		return gc0310_init(sd);
+	if (ret)
+		return ret;
 
-	return ret;
+	return gc0310_init(sd);
 }
 
 /*
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
  2020-10-06 20:29 ` Leonid Kushnir
  (?)
@ 2020-10-17 13:58 ` leonf08
  2020-10-17 14:02   ` [Outreachy kernel] " Julia Lawall
  2020-10-17 14:05   ` Greg KH
  -1 siblings, 2 replies; 7+ messages in thread
From: leonf08 @ 2020-10-17 13:58 UTC (permalink / raw)
  To: outreachy-kernel

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

Hello. I‘ve sent recently my first two patches and haven’t received any
feedback. Can I expect it. I’m a newbie in kernel contribution process, so
don’t know all the details.
Thanks.

вт, 6 окт. 2020 г. в 22:29, Leonid Kushnir <leonf008@gmail.com>:

> This patch fixes check of a result of 'power_up()' function call in
> function 'gc0310_s_power()' to do "error handling" instead of "success
> handling" as Dan Carpenter noted in his comment on the previous patch.
> Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct
> value of 'ret' is checked in IF statement now.
>
> Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
> ---
>  drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
> b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
> index 8201c15b5769..d170d0adfea4 100644
> --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
> +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
> @@ -874,11 +874,12 @@ static int gc0310_s_power(struct v4l2_subdev *sd,
> int on)
>
>         if (on == 0)
>                 return power_down(sd);
> +
>         ret = power_up(sd);
> -       if (!ret)
> -               return gc0310_init(sd);
> +       if (ret)
> +               return ret;
>
> -       return ret;
> +       return gc0310_init(sd);
>  }
>
>  /*
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 2079 bytes --]

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

* Re: [Outreachy kernel] Re: [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
  2020-10-17 13:58 ` leonf08
@ 2020-10-17 14:02   ` Julia Lawall
  2020-10-17 14:05   ` Greg KH
  1 sibling, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2020-10-17 14:02 UTC (permalink / raw)
  To: leonf08; +Cc: outreachy-kernel

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



On Sat, 17 Oct 2020, leonf08 wrote:

> Hello. I‘ve sent recently my first two patches and haven’t received any
> feedback. Can I expect it. I’m a newbie in kernel contribution process, so
> don’t know all the details.

I don't have any recollection of seeing any mail from you.  Did you verify
on the google groups web interface that your messages are there?

julia

> Thanks.
>
> вт, 6 окт. 2020 г. в 22:29, Leonid Kushnir <leonf008@gmail.com>:
>       This patch fixes check of a result of 'power_up()' function call
>       in
>       function 'gc0310_s_power()' to do "error handling" instead of
>       "success
>       handling" as Dan Carpenter noted in his comment on the previous
>       patch.
>       Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and
>       direct
>       value of 'ret' is checked in IF statement now.
>
>       Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
>       ---
>        drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---
>        1 file changed, 4 insertions(+), 3 deletions(-)
>
>       diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
>       b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
>       index 8201c15b5769..d170d0adfea4 100644
>       --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
>       +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
>       @@ -874,11 +874,12 @@ static int gc0310_s_power(struct
>       v4l2_subdev *sd, int on)
>
>               if (on == 0)
>                       return power_down(sd);
>       +
>               ret = power_up(sd);
>       -       if (!ret)
>       -               return gc0310_init(sd);
>       +       if (ret)
>       +               return ret;
>
>       -       return ret;
>       +       return gc0310_init(sd);
>        }
>
>        /*
>       --
>       2.25.1
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAN%2Bihrq_v6OFbOrZUhHZP
> RTjsUO5nrnr7Kj3AHQJYSD7%2BoXe5g%40mail.gmail.com.
>
>

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

* Re: [Outreachy kernel] Re: [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
  2020-10-17 13:58 ` leonf08
  2020-10-17 14:02   ` [Outreachy kernel] " Julia Lawall
@ 2020-10-17 14:05   ` Greg KH
  2020-10-17 14:49     ` leonf08
  1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2020-10-17 14:05 UTC (permalink / raw)
  To: leonf08; +Cc: outreachy-kernel

On Sat, Oct 17, 2020 at 03:58:41PM +0200, leonf08 wrote:
> Hello. I‘ve sent recently my first two patches and haven’t received any
> feedback. Can I expect it. I’m a newbie in kernel contribution process, so
> don’t know all the details.
> Thanks.
> 
> вт, 6 окт. 2020 г. в 22:29, Leonid Kushnir <leonf008@gmail.com>:
> 
> > This patch fixes check of a result of 'power_up()' function call in
> > function 'gc0310_s_power()' to do "error handling" instead of "success
> > handling" as Dan Carpenter noted in his comment on the previous patch.
> > Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct
> > value of 'ret' is checked in IF statement now.
> >
> > Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
> > ---
> >  drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---

As the instructions say, for patches in drivers/staging/media/*, there
is no guaranteed response time, and so it is not good to do work in
there for the outreachy application process.

Please pick some other directory under drivers/staging/ that is not the
media/ subdir.

Again, the instructions should already say that, I recommend reading it
again fully.

thanks,

greg k-h


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

* Re: [Outreachy kernel] Re: [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
  2020-10-17 14:05   ` Greg KH
@ 2020-10-17 14:49     ` leonf08
  2020-10-17 14:59       ` Vaishali Thakkar
  0 siblings, 1 reply; 7+ messages in thread
From: leonf08 @ 2020-10-17 14:49 UTC (permalink / raw)
  To: Greg KH; +Cc: outreachy-kernel

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

Thanks a lot. I must haven’t noticed that.

сб, 17 окт. 2020 г. в 16:04, Greg KH <gregkh@linuxfoundation.org>:

> On Sat, Oct 17, 2020 at 03:58:41PM +0200, leonf08 wrote:
> > Hello. I‘ve sent recently my first two patches and haven’t received any
> > feedback. Can I expect it. I’m a newbie in kernel contribution process,
> so
> > don’t know all the details.
> > Thanks.
> >
> > вт, 6 окт. 2020 г. в 22:29, Leonid Kushnir <leonf008@gmail.com>:
> >
> > > This patch fixes check of a result of 'power_up()' function call in
> > > function 'gc0310_s_power()' to do "error handling" instead of "success
> > > handling" as Dan Carpenter noted in his comment on the previous patch.
> > > Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct
> > > value of 'ret' is checked in IF statement now.
> > >
> > > Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
> > > ---
> > >  drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---
>
> As the instructions say, for patches in drivers/staging/media/*, there
> is no guaranteed response time, and so it is not good to do work in
> there for the outreachy application process.
>
> Please pick some other directory under drivers/staging/ that is not the
> media/ subdir.
>
> Again, the instructions should already say that, I recommend reading it
> again fully.
>
> thanks,
>
> greg k-h
>

[-- Attachment #2: Type: text/html, Size: 2013 bytes --]

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

* Re: [Outreachy kernel] Re: [PATCH 3/3] media: staging: atomisp: Corrected error handling in function
  2020-10-17 14:49     ` leonf08
@ 2020-10-17 14:59       ` Vaishali Thakkar
  0 siblings, 0 replies; 7+ messages in thread
From: Vaishali Thakkar @ 2020-10-17 14:59 UTC (permalink / raw)
  To: leonf08; +Cc: Greg KH, outreachy-kernel

On Sat, Oct 17, 2020 at 8:19 PM leonf08 <leonf008@gmail.com> wrote:
>
> Thanks a lot. I must haven’t noticed that.

Please avoid top-posting while replying to emails of
others. [Checkout 'Responding to emails' part of the
tutorial on kernelnewbies]

> сб, 17 окт. 2020 г. в 16:04, Greg KH <gregkh@linuxfoundation.org>:
>>
>> On Sat, Oct 17, 2020 at 03:58:41PM +0200, leonf08 wrote:
>> > Hello. I‘ve sent recently my first two patches and haven’t received any
>> > feedback. Can I expect it. I’m a newbie in kernel contribution process, so
>> > don’t know all the details.

I don't see any patches from you in the pending emails or
otherwise on the web interface of the list.

Anyway, I would suggest that you send new patches for some
other issues as it seems that your previous patches were fixing
things in staging/media. You can verify if they landed in the list
by checking on the web interface.

>> > Thanks.
>> >
>> > вт, 6 окт. 2020 г. в 22:29, Leonid Kushnir <leonf008@gmail.com>:
>> >
>> > > This patch fixes check of a result of 'power_up()' function call in
>> > > function 'gc0310_s_power()' to do "error handling" instead of "success
>> > > handling" as Dan Carpenter noted in his comment on the previous patch.
>> > > Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct
>> > > value of 'ret' is checked in IF statement now.
>> > >
>> > > Signed-off-by: Leonid Kushnir <leonf008@gmail.com>
>> > > ---
>> > >  drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 7 ++++---
>>
>> As the instructions say, for patches in drivers/staging/media/*, there
>> is no guaranteed response time, and so it is not good to do work in
>> there for the outreachy application process.
>>
>> Please pick some other directory under drivers/staging/ that is not the
>> media/ subdir.
>>
>> Again, the instructions should already say that, I recommend reading it
>> again fully.
>>
>> thanks,
>>
>> greg k-h
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAN%2BihrpqYw_29OHpQHAxAadOFt8h3dovo-ZKMQN_OcbtEx4HcQ%40mail.gmail.com.



-- 
Vaishali


-- 
Vaishali


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

end of thread, other threads:[~2020-10-17 14:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 20:29 [PATCH 3/3] media: staging: atomisp: Corrected error handling in function Leonid Kushnir
2020-10-06 20:29 ` Leonid Kushnir
2020-10-17 13:58 ` leonf08
2020-10-17 14:02   ` [Outreachy kernel] " Julia Lawall
2020-10-17 14:05   ` Greg KH
2020-10-17 14:49     ` leonf08
2020-10-17 14:59       ` Vaishali Thakkar

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.