All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
@ 2017-10-10 20:10 Gustavo A. R. Silva
  2017-10-11  7:45 ` Johan Hovold
  0 siblings, 1 reply; 8+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-10 20:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/staging/greybus/es2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index f7b24e0..e451c2f 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -761,6 +761,7 @@ static int check_urb_status(struct urb *urb)
 	case -EOVERFLOW:
 		dev_err(dev, "%s: overflow actual length is %d\n",
 			__func__, urb->actual_length);
+		/* fall through */
 	case -ECONNRESET:
 	case -ENOENT:
 	case -ESHUTDOWN:
-- 
2.7.4

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-10 20:10 [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status Gustavo A. R. Silva
@ 2017-10-11  7:45 ` Johan Hovold
  2017-10-11 15:12   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 8+ messages in thread
From: Johan Hovold @ 2017-10-11  7:45 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Greg Kroah-Hartman, linux-kernel

On Tue, Oct 10, 2017 at 03:10:41PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Acked-by: Johan Hovold <johan@kernel.org>

Patch is fine, but next time make sure to run scripts/get_maintainer.sh
to figure which people and lists to CC.

We also try to include the module (component) "es2" in the commit
summary (unless you really are doing things subsystem wide), although
that has not been enforced for staging clean ups recently.

Thanks,
Johan

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-11  7:45 ` Johan Hovold
@ 2017-10-11 15:12   ` Gustavo A. R. Silva
  2017-10-11 16:06     ` Joe Perches
  2017-10-11 16:08     ` Johan Hovold
  0 siblings, 2 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-11 15:12 UTC (permalink / raw)
  To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-kernel

Hi Johan,

Quoting Johan Hovold <johan@kernel.org>:

> On Tue, Oct 10, 2017 at 03:10:41PM -0500, Gustavo A. R. Silva wrote:
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>
> Acked-by: Johan Hovold <johan@kernel.org>
>
> Patch is fine, but next time make sure to run scripts/get_maintainer.sh
> to figure which people and lists to CC.
>

I actually did:

$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
drivers/staging/greybus/es2.c

and this was the output:

linux-kernel@vger.kernel.org (open list)

> We also try to include the module (component) "es2" in the commit
> summary (unless you really are doing things subsystem wide), although
> that has not been enforced for staging clean ups recently.
>

I got it. I'll take that into account for future patches.

Thanks
--
Gustavo A. R. Silva

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-11 15:12   ` Gustavo A. R. Silva
@ 2017-10-11 16:06     ` Joe Perches
  2017-10-11 16:34       ` Gustavo A. R. Silva
  2017-10-11 16:08     ` Johan Hovold
  1 sibling, 1 reply; 8+ messages in thread
From: Joe Perches @ 2017-10-11 16:06 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Johan Hovold; +Cc: Greg Kroah-Hartman, linux-kernel

On Wed, 2017-10-11 at 10:12 -0500, Gustavo A. R. Silva wrote:
> Hi Johan,
> 
> Quoting Johan Hovold <johan@kernel.org>:
> 
> > On Tue, Oct 10, 2017 at 03:10:41PM -0500, Gustavo A. R. Silva wrote:
> > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > > where we are expecting to fall through.
> > > 
> > > Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> > 
> > Acked-by: Johan Hovold <johan@kernel.org>
> > 
> > Patch is fine, but next time make sure to run scripts/get_maintainer.sh
> > to figure which people and lists to CC.
> > 
> 
> I actually did:
> 
> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
> drivers/staging/greybus/es2.c
> 
> and this was the output:
> 
> linux-kernel@vger.kernel.org (open list)

I don't know how that happens.

$ ./scripts/get_maintainer.pl -f --nokeywords --nogit --nogit-fallback drivers/staging/greybus/es2.c
Johan Hovold <johan@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
Alex Elder <elder@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:GREYBUS SUBSYSTEM)
greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM)
devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
linux-kernel@vger.kernel.org (open list)

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-11 15:12   ` Gustavo A. R. Silva
  2017-10-11 16:06     ` Joe Perches
@ 2017-10-11 16:08     ` Johan Hovold
  2017-10-11 16:31       ` Gustavo A. R. Silva
  1 sibling, 1 reply; 8+ messages in thread
From: Johan Hovold @ 2017-10-11 16:08 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-kernel

On Wed, Oct 11, 2017 at 10:12:50AM -0500, Gustavo A. R. Silva wrote:
> Hi Johan,
> 
> Quoting Johan Hovold <johan@kernel.org>:

> > Patch is fine, but next time make sure to run scripts/get_maintainer.sh
> > to figure which people and lists to CC.
> >
> 
> I actually did:
> 
> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
> drivers/staging/greybus/es2.c
> 
> and this was the output:
> 
> linux-kernel@vger.kernel.org (open list)

Very odd. If I run the exact same command I get the expected result:

Johan Hovold <johan@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
Alex Elder <elder@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:GREYBUS SUBSYSTEM)
greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM)
devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
linux-kernel@vger.kernel.org (open list)

> > We also try to include the module (component) "es2" in the commit
> > summary (unless you really are doing things subsystem wide), although
> > that has not been enforced for staging clean ups recently.
> >
> 
> I got it. I'll take that into account for future patches.

Looking at the commit history for the file in questions usually gives a
hint about the style used for the corresponding subsystem.

Thanks,
Johan

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-11 16:08     ` Johan Hovold
@ 2017-10-11 16:31       ` Gustavo A. R. Silva
  2017-10-12  9:05         ` Johan Hovold
  0 siblings, 1 reply; 8+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-11 16:31 UTC (permalink / raw)
  To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-kernel


Quoting Johan Hovold <johan@kernel.org>:

> On Wed, Oct 11, 2017 at 10:12:50AM -0500, Gustavo A. R. Silva wrote:
>> Hi Johan,
>>
>> Quoting Johan Hovold <johan@kernel.org>:
>
>> > Patch is fine, but next time make sure to run scripts/get_maintainer.sh
>> > to figure which people and lists to CC.
>> >
>>
>> I actually did:
>>
>> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback
>> drivers/staging/greybus/es2.c
>>
>> and this was the output:
>>
>> linux-kernel@vger.kernel.org (open list)
>
> Very odd. If I run the exact same command I get the expected result:
>
> Johan Hovold <johan@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
> Alex Elder <elder@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:GREYBUS  
> SUBSYSTEM)
> greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM)
> devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
> linux-kernel@vger.kernel.org (open list)
>

I double checked and this is what happened:

$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
drivers//staging/greybus/es2.c

Notice that double slash after drivers: //

For some reason I was running that command instead of this one:

$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
drivers/staging/greybus/es2.c

>> > We also try to include the module (component) "es2" in the commit
>> > summary (unless you really are doing things subsystem wide), although
>> > that has not been enforced for staging clean ups recently.
>> >
>>
>> I got it. I'll take that into account for future patches.
>
> Looking at the commit history for the file in questions usually gives a
> hint about the style used for the corresponding subsystem.
>

Yep, I usually do that:

$ git log --oneline drivers/staging/greybus/es2.c

This time I got many of these two:

staging: greybus:
greybus: es2:

so I picked up the first one.

But I get your point and I understand now that I should have used the  
second one.

Thanks
--
Gustavo A. R. Silva

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-11 16:06     ` Joe Perches
@ 2017-10-11 16:34       ` Gustavo A. R. Silva
  0 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-11 16:34 UTC (permalink / raw)
  To: Joe Perches; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-kernel

Hi Joe,

Quoting Joe Perches <joe@perches.com>:

> On Wed, 2017-10-11 at 10:12 -0500, Gustavo A. R. Silva wrote:
>> Hi Johan,
>>
>> Quoting Johan Hovold <johan@kernel.org>:
>>
>> > On Tue, Oct 10, 2017 at 03:10:41PM -0500, Gustavo A. R. Silva wrote:
>> > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> > > where we are expecting to fall through.
>> > >
>> > > Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> >
>> > Acked-by: Johan Hovold <johan@kernel.org>
>> >
>> > Patch is fine, but next time make sure to run scripts/get_maintainer.sh
>> > to figure which people and lists to CC.
>> >
>>
>> I actually did:
>>
>> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback
>> drivers/staging/greybus/es2.c
>>
>> and this was the output:
>>
>> linux-kernel@vger.kernel.org (open list)
>
> I don't know how that happens.
>
> $ ./scripts/get_maintainer.pl -f --nokeywords --nogit  
> --nogit-fallback drivers/staging/greybus/es2.c
> Johan Hovold <johan@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
> Alex Elder <elder@kernel.org> (maintainer:GREYBUS SUBSYSTEM)
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:GREYBUS  
> SUBSYSTEM)
> greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM)
> devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
> linux-kernel@vger.kernel.org (open list)

I was running this command:

$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
drivers//staging/greybus/es2.c

instead of this one:

$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
drivers/staging/greybus/es2.c

Thanks
--
Gustavo A. R. Silva

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

* Re: [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status
  2017-10-11 16:31       ` Gustavo A. R. Silva
@ 2017-10-12  9:05         ` Johan Hovold
  0 siblings, 0 replies; 8+ messages in thread
From: Johan Hovold @ 2017-10-12  9:05 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-kernel

On Wed, Oct 11, 2017 at 11:31:07AM -0500, Gustavo A. R. Silva wrote:
> Quoting Johan Hovold <johan@kernel.org>:
> 
> > On Wed, Oct 11, 2017 at 10:12:50AM -0500, Gustavo A. R. Silva wrote:
> >> Hi Johan,
> >>
> >> Quoting Johan Hovold <johan@kernel.org>:
> >
> >> > Patch is fine, but next time make sure to run scripts/get_maintainer.sh
> >> > to figure which people and lists to CC.
> >> >
> >>
> >> I actually did:
> >>
> >> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback
> >> drivers/staging/greybus/es2.c
> >>
> >> and this was the output:
> >>
> >> linux-kernel@vger.kernel.org (open list)

> I double checked and this is what happened:
> 
> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback  
> drivers//staging/greybus/es2.c
> 
> Notice that double slash after drivers: //

Ah, perhaps something which should be supported.

> >> > We also try to include the module (component) "es2" in the commit
> >> > summary (unless you really are doing things subsystem wide), although
> >> > that has not been enforced for staging clean ups recently.
> >> >
> >>
> >> I got it. I'll take that into account for future patches.
> >
> > Looking at the commit history for the file in questions usually gives a
> > hint about the style used for the corresponding subsystem.
> >
> 
> Yep, I usually do that:
> 
> $ git log --oneline drivers/staging/greybus/es2.c
> 
> This time I got many of these two:
> 
> staging: greybus:
> greybus: es2:
> 
> so I picked up the first one.
> 
> But I get your point and I understand now that I should have used the  
> second one.

Good, so you already have the habit of doing so. As I mentioned, this
file in staging is not the best example since the prefix has changed
over time and not really been enforced lately (it should really be
"staging: greybus: es2" now).

Thanks,
Johan

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

end of thread, other threads:[~2017-10-12  9:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 20:10 [PATCH] staging: greybus: mark expected switch fall-through in check_urb_status Gustavo A. R. Silva
2017-10-11  7:45 ` Johan Hovold
2017-10-11 15:12   ` Gustavo A. R. Silva
2017-10-11 16:06     ` Joe Perches
2017-10-11 16:34       ` Gustavo A. R. Silva
2017-10-11 16:08     ` Johan Hovold
2017-10-11 16:31       ` Gustavo A. R. Silva
2017-10-12  9:05         ` Johan Hovold

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.