linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warnings after merge of the cifs tree
@ 2018-11-26  0:14 Stephen Rothwell
  2018-11-26  0:31 ` Steve French
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2018-11-26  0:14 UTC (permalink / raw)
  To: Steve French, CIFS, Kees Cook
  Cc: Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

After merging the cifs tree, today's linux-next build (powerpc
ppc64_defconfig) produced these warnings:

fs/cifs/sess.c: In function 'cifs_select_sectype':
fs/cifs/sess.c:527:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   switch (requested) {
   ^~~~~~
fs/cifs/sess.c:540:2: note: here
  case CIFS_NEGFLAVOR_LANMAN:
  ^~~~
fs/cifs/connect.c: In function 'cifs_parse_mount_options':
fs/cifs/connect.c:1825:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (!(tmp_end < end && tmp_end[1] == delim)) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/cifs/connect.c:1832:3: note: here
   case Opt_pass:
   ^~~~

Exposed by my use of -Wimplicit-fallthrough

I am not sure why these only turned up now (as opposed to earlier today).

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warnings after merge of the cifs tree
  2018-11-26  0:14 linux-next: build warnings after merge of the cifs tree Stephen Rothwell
@ 2018-11-26  0:31 ` Steve French
  2018-11-26  0:52   ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Steve French @ 2018-11-26  0:31 UTC (permalink / raw)
  To: Stephen Rothwell, Sachin Prabhu
  Cc: CIFS, keescook, Linux-Next Mailing List, LKML

Both of those cases are intentional fallthroughs and there are
existing comments in the code noting the reasons for them to
fallthrough

(also can see the reasoning for these in the commits which introduced
them from Sachin c369c9a4a7c82) and dde2356c84662)
On Sun, Nov 25, 2018 at 6:14 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the cifs tree, today's linux-next build (powerpc
> ppc64_defconfig) produced these warnings:
>
> fs/cifs/sess.c: In function 'cifs_select_sectype':
> fs/cifs/sess.c:527:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    switch (requested) {
>    ^~~~~~
> fs/cifs/sess.c:540:2: note: here
>   case CIFS_NEGFLAVOR_LANMAN:
>   ^~~~
> fs/cifs/connect.c: In function 'cifs_parse_mount_options':
> fs/cifs/connect.c:1825:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     if (!(tmp_end < end && tmp_end[1] == delim)) {
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fs/cifs/connect.c:1832:3: note: here
>    case Opt_pass:
>    ^~~~
>
> Exposed by my use of -Wimplicit-fallthrough
>
> I am not sure why these only turned up now (as opposed to earlier today).
>
> --
> Cheers,
> Stephen Rothwell



-- 
Thanks,

Steve

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

* Re: linux-next: build warnings after merge of the cifs tree
  2018-11-26  0:31 ` Steve French
@ 2018-11-26  0:52   ` Stephen Rothwell
  2018-11-26  5:48     ` Kees Cook
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2018-11-26  0:52 UTC (permalink / raw)
  To: Steve French; +Cc: Sachin Prabhu, CIFS, keescook, Linux-Next Mailing List, LKML

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

Hi Steve,

On Sun, 25 Nov 2018 18:31:40 -0600 Steve French <smfrench@gmail.com> wrote:
>
> Both of those cases are intentional fallthroughs and there are
> existing comments in the code noting the reasons for them to
> fallthrough
> 
> (also can see the reasoning for these in the commits which introduced
> them from Sachin c369c9a4a7c82) and dde2356c84662)

I am not questioning that :-)

The gcc warning can be turned off by adding a /* fall through */
comment at the point the fall through happens.  Kees and others are
working on the several hundred other places that need annotating.

This one just popped up.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: build warnings after merge of the cifs tree
  2018-11-26  0:52   ` Stephen Rothwell
@ 2018-11-26  5:48     ` Kees Cook
  2018-11-26  6:51       ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Kees Cook @ 2018-11-26  5:48 UTC (permalink / raw)
  To: Stephen Rothwell, Gustavo A. R. Silva
  Cc: smfrench, sprabhu, linux-cifs, Linux-Next, LKML

On Sun, Nov 25, 2018 at 4:52 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Steve,
>
> On Sun, 25 Nov 2018 18:31:40 -0600 Steve French <smfrench@gmail.com> wrote:
> >
> > Both of those cases are intentional fallthroughs and there are
> > existing comments in the code noting the reasons for them to
> > fallthrough
> >
> > (also can see the reasoning for these in the commits which introduced
> > them from Sachin c369c9a4a7c82) and dde2356c84662)
>
> I am not questioning that :-)
>
> The gcc warning can be turned off by adding a /* fall through */
> comment at the point the fall through happens.  Kees and others are
> working on the several hundred other places that need annotating.

Right. The goal is to avoid adding any _new_ cases of this. :)

> This one just popped up.

It's already working! :) Thanks Stephen!

-Kees

-- 
Kees Cook

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

* Re: linux-next: build warnings after merge of the cifs tree
  2018-11-26  5:48     ` Kees Cook
@ 2018-11-26  6:51       ` Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2018-11-26  6:51 UTC (permalink / raw)
  To: Kees Cook
  Cc: Gustavo A. R. Silva, smfrench, sprabhu, linux-cifs, Linux-Next, LKML

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

Hi Kees,

On Sun, 25 Nov 2018 21:48:10 -0800 Kees Cook <keescook@google.com> wrote:
>
> On Sun, Nov 25, 2018 at 4:52 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > On Sun, 25 Nov 2018 18:31:40 -0600 Steve French <smfrench@gmail.com> wrote:  
> > >
> > > Both of those cases are intentional fallthroughs and there are
> > > existing comments in the code noting the reasons for them to
> > > fallthrough
> > >
> > > (also can see the reasoning for these in the commits which introduced
> > > them from Sachin c369c9a4a7c82) and dde2356c84662)  
> >
> > I am not questioning that :-)
> >
> > The gcc warning can be turned off by adding a /* fall through */
> > comment at the point the fall through happens.  Kees and others are
> > working on the several hundred other places that need annotating.  
> 
> Right. The goal is to avoid adding any _new_ cases of this. :)
> 
> > This one just popped up.  
> 
> It's already working! :) Thanks Stephen!

Actually this one was the product of how I filter out warnings ... it
was an old one, but the line numbers changed.   I have now started
ignoring these if just the line numbers change.

-- 
Cheers,
Stephen Rothwell

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

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

end of thread, other threads:[~2018-11-26  6:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26  0:14 linux-next: build warnings after merge of the cifs tree Stephen Rothwell
2018-11-26  0:31 ` Steve French
2018-11-26  0:52   ` Stephen Rothwell
2018-11-26  5:48     ` Kees Cook
2018-11-26  6:51       ` Stephen Rothwell

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