linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <bbrezillon@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
Date: Wed, 13 Feb 2019 15:05:42 +0100	[thread overview]
Message-ID: <20190213150542.552adeb1@kernel.org> (raw)
In-Reply-To: <20190212153131.GA5746@embeddedor>

On Tue, 12 Feb 2019 09:31:31 -0600
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warning:
> 
> drivers/mtd/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
> drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (mode == FL_READY && chip->oldstate == FL_READY)
>       ^
> drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
>   default:
>   ^~~~~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
> 

You sent me that one twice, is that expected? Is this a new version,
and in that case, what has changed?

> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/mtd/lpddr/lpddr_cmds.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
> index b13557fe52bd..76a4c73e100e 100644
> --- a/drivers/mtd/lpddr/lpddr_cmds.c
> +++ b/drivers/mtd/lpddr/lpddr_cmds.c
> @@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
>  		/* Only if there's no operation suspended... */
>  		if (mode == FL_READY && chip->oldstate == FL_READY)
>  			return 0;
> +		/* fall through */
>  
>  	default:
>  sleep:


  reply	other threads:[~2019-02-13 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 15:31 [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through Gustavo A. R. Silva
2019-02-13 14:05 ` Boris Brezillon [this message]
2019-02-13 18:11   ` Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
2019-02-08 18:12 Gustavo A. R. Silva
2019-03-20 20:17 ` Gustavo A. R. Silva
2019-04-10 21:15   ` Gustavo A. R. Silva
2019-04-10 21:47 ` Kees Cook

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=20190213150542.552adeb1@kernel.org \
    --to=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    /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).