mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Marian Posteuca <posteuca@mutex.one>,
	Ioana Radulescu <ruxandra.radulescu@nxp.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH] staging: dpaa2-ethsw: fix switch/case fallthrough warning
Date: Sun, 19 Jul 2020 23:09:25 -0700	[thread overview]
Message-ID: <9b0c3eb7088bfa2f64b143d70e5a4fb7947da330.camel@perches.com> (raw)
In-Reply-To: <20200720053036.10383-1-posteuca@mutex.one>

On Mon, 2020-07-20 at 08:30 +0300, Marian Posteuca wrote:
> Fix the fallthrough warning that is reported by checkpatch.
> 
> Signed-off-by: Marian Posteuca <posteuca@mutex.one>
> ---
>  drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
> index 2fb75a7c9314..4986591097dc 100644
> --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
> +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
> @@ -1362,7 +1362,8 @@ static int port_switchdev_blocking_event(struct notifier_block *unused,
>  		return NOTIFY_DONE;
>  
>  	switch (event) {
> -	case SWITCHDEV_PORT_OBJ_ADD: /* fall through */
> +	case SWITCHDEV_PORT_OBJ_ADD:
> +		fallthrough;

This comment is better removed instead of
converted to fallthrough;

It's no different than a multiple case block like:

	switch (val) {
	case FOO:
	case BAR:
		foobar();
		break;
	default:
		return baz;
	}

etc...



      reply	other threads:[~2020-07-20  6:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  5:30 Marian Posteuca
2020-07-20  6:09 ` 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=9b0c3eb7088bfa2f64b143d70e5a4fb7947da330.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ioana.ciornei@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=posteuca@mutex.one \
    --cc=ruxandra.radulescu@nxp.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®