From: Joe Perches <joe@perches.com>
To: David Howells <dhowells@redhat.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Nathan Huckleberry <nhuck@google.com>,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] afs: Move comments after /* fallthrough */
Date: Thu, 15 Aug 2019 16:46:01 -0700 [thread overview]
Message-ID: <d98d1f0150bec8b69a886f77fc375b8ca9d24262.camel@perches.com> (raw)
In-Reply-To: <12308.1565876416@warthog.procyon.org.uk>
On Thu, 2019-08-15 at 14:40 +0100, David Howells wrote:
> 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.
>
> This doesn't sound good. Can you give an illustration of what a resulting
> case might look like? Say taking the following as an example:
>
> > @@ -282,10 +282,8 @@ static int afs_deliver_cb_callback(struct afs_call *call)
> > case 0:
> > afs_extract_to_tmp(call);
> > call->unmarshall++;
> > -
> > - /* extract the FID array and its count in two steps */
> > /* fall through */
> > - case 1:
> > + case 1: /* extract the FID array and its count in two steps */
> > _debug("extract FID count");
> > ret = afs_extract_data(call, true);
> > if (ret < 0)
This case above would not change, but this case below would:
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c
index 114f281f3687..d9dc1bdfa695 100644
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@ -341,8 +341,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)
}
/* Fall through */
- /* extract the returned data length */
- case 1:
+ case 1: /* extract the returned data length */
_debug("extract data length");
ret = afs_extract_data(call, true);
if (ret < 0)
Here the script would not convert the /* Fall through */
because the next non-blank line does not start with
case or default
next prev parent reply other threads:[~2019-08-15 23:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 2:36 Joe Perches
2019-08-15 13:40 ` David Howells
2019-08-15 23:46 ` Joe Perches [this message]
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
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=d98d1f0150bec8b69a886f77fc375b8ca9d24262.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
all inboxes | Powered by JetHome®