From: Leon Romanovsky <leon@kernel.org>
To: 陳偉銘 <jj251510319013@gmail.com>
Cc: RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH] i40iw: Use fallthrough pseudo-keyword
Date: Sun, 9 May 2021 17:15:09 +0300 [thread overview]
Message-ID: <YJfubeqo49bF7qgH@unreal> (raw)
In-Reply-To: <CAJwFiGK-ABAuNGcFbXAr6d6bn10_t8O+3h09Xt15WGh-7G1W3A@mail.gmail.com>
On Sun, May 09, 2021 at 09:55:57PM +0800, 陳偉銘 wrote:
> >Leon Romanovsky <leon@kernel.org> 於 2021年5月9日 週日 下午8:22寫道:
> > Please don't top-post, use HTML emails and always CC mailing list.
>
> > I'm saying that there is a difference between two following snippets:
> > switch (value) {
> > case STATE_ONE:
> > do_something();
> > case STATE_TWO:
> > do_other();
> > break;
> > default:
> > WARN("unknown state");
> > }
> > and
> >
> > switch (value) {
> > case STATE_ONE:
> > case STATE_TWO:
> > do_other();
> > break;
> > default:
> > WARN("unknown state");
> > }
> >
> > While the first one needs "fallthrough" keyword, the second one doesn't.
>
> > Thanks
>
> Hi,
>
> Sorry for making trouble, hope that I make it right this time.
>
> Thanks for the detailed explanation, since that it is not needed to use
> "fallthrough" if no code in "case", maybe we should clarify for this
> condition in the documentataion? Otherwise, I guess there might be someone
> else like me making this mistake again in the future.
I don't think that it is necessary.
Thanks.
>
> Thanks!
>
> Wei Ming Chen
prev parent reply other threads:[~2021-05-09 14:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-09 8:31 [PATCH] i40iw: Use fallthrough pseudo-keyword Wei Ming Chen
2021-05-09 10:50 ` Leon Romanovsky
[not found] ` <CAJwFiGLyH5aOY=MGvCawWBm7fXuPkndBO83jkT9dWhPpnrd+cw@mail.gmail.com>
2021-05-09 12:22 ` Leon Romanovsky
[not found] ` <CAJwFiGK-ABAuNGcFbXAr6d6bn10_t8O+3h09Xt15WGh-7G1W3A@mail.gmail.com>
2021-05-09 14:15 ` Leon Romanovsky [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=YJfubeqo49bF7qgH@unreal \
--to=leon@kernel.org \
--cc=jj251510319013@gmail.com \
--cc=linux-rdma@vger.kernel.org \
/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).