From: Joe Perches <joe@perches.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: David Howells <dhowells@redhat.com>,
Nathan Chancellor <natechancellor@gmail.com>,
Nathan Huckleberry <nhuck@google.com>,
linux-afs@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] afs: Move comments after /* fallthrough */
Date: Thu, 15 Aug 2019 15:55:39 -0700 [thread overview]
Message-ID: <29743c8d0a5e5f4a1ead55bc614ed53079a42597.camel@perches.com> (raw)
In-Reply-To: <CAKwvOdmuReaFgFK+=aib6rRfAb_GTGubLyJ3sAH-tnkKYHASqQ@mail.gmail.com>
On Thu, 2019-08-15 at 15:34 -0700, Nick Desaulniers wrote:
> On Wed, Aug 14, 2019 at 7:36 PM Joe Perches <joe@perches.com> wrote:
> > Make the code a bit easier for a script to appropriately convert
> > case statement blocks with /* fallthrough */ comments to a macro by
> > moving comments describing the next case block to the case statement.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > fs/afs/cmservice.c | 10 +++-------
> > fs/afs/fsclient.c | 51 +++++++++++++++++----------------------------------
> > fs/afs/vlclient.c | 50 +++++++++++++++++++++++++-------------------------
> > fs/afs/yfsclient.c | 51 +++++++++++++++++----------------------------------
>
> So these changes are across just fs/afs, how many patches like this
> would you need across the whole tree to solve this problem?
No idea. I only looked at afs when Nathan Chancellor showed
there were 350 or so changes necessary in the kernel tree.
The afs entries were 50 of them so I just looked and saw why.
I haven't looked at all the others.
https://gist.github.com/nathanchance/ffbd71b48ba197837e1bdd9bb863b85f
But probably most of the others are missing a fallthrough to
a break like:
switch {foo} {
case 1:
<bar>;
default:
break;
}
where gcc does not emit a warning but clang apparently does.
I do think gcc should emit a warning here too so I filed a
gcc bugzilla entry.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432
prev parent reply other threads:[~2019-08-15 22:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 2:36 [PATCH] afs: Move comments after /* fallthrough */ Joe Perches
2019-08-15 13:40 ` David Howells
2019-08-15 23:46 ` Joe Perches
2019-08-16 10:36 ` David Howells
2019-08-16 11:07 ` Joe Perches
2019-08-19 21:03 ` David Howells
2019-08-19 21:50 ` Joe Perches
2019-08-15 22:34 ` Nick Desaulniers
2019-08-15 22:55 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29743c8d0a5e5f4a1ead55bc614ed53079a42597.camel@perches.com \
--to=joe@perches.com \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=nhuck@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).