From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>,
Wan ZongShun <mcuos.com@gmail.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, Marek Vasut <marek.vasut@gmail.com>,
linux-mtd@lists.infradead.org,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
Date: Mon, 1 Apr 2019 17:23:09 +0200 [thread overview]
Message-ID: <20190401172309.4c6929a8@xps13> (raw)
In-Reply-To: <20190208174930.GA12962@embeddedor>
Hi Gustavo,
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Fri, 8 Feb 2019
11:49:30 -0600:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warning:
>
> drivers/mtd/nand/raw/diskonchip.c: In function ‘doc_probe’:
> ./include/linux/printk.h:303:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
> printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/diskonchip.c:1479:4: note: in expansion of macro ‘pr_err’
> pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
> ^~~~~~
> drivers/mtd/nand/raw/diskonchip.c:1480:3: note: here
> default:
> ^~~~~~~
> drivers/mtd/nand/raw/nandsim.c: In function ‘ns_init_module’:
> drivers/mtd/nand/raw/nandsim.c:2254:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
> chip->bbt_options |= NAND_BBT_NO_OOB;
> drivers/mtd/nand/raw/nandsim.c:2255:2: note: here
> case 1:
> ^~~~
> drivers/mtd/nand/raw/nuc900_nand.c: In function ‘nuc900_nand_command_lp’:
> ./arch/x86/include/asm/io.h:91:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
> #define __raw_writel __writel
> drivers/mtd/nand/raw/nuc900_nand.c:52:2: note: in expansion of macro ‘__raw_writel’
> __raw_writel((val), (dev)->reg + REG_SMCMD)
> ^~~~~~~~~~~~
> drivers/mtd/nand/raw/nuc900_nand.c:196:3: note: in expansion of macro ‘write_cmd_reg’
> write_cmd_reg(nand, NAND_CMD_READSTART);
> ^~~~~~~~~~~~~
> drivers/mtd/nand/raw/nuc900_nand.c:197:2: note: here
> default:
> ^~~~~~~
> drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_restore’:
> drivers/mtd/nand/raw/omap_elm.c:512:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
> elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> regs->elm_syndrome_fragment_4[i]);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:514:3: note: here
> case BCH8_ECC:
> ^~~~
> drivers/mtd/nand/raw/omap_elm.c:517:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
> elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> regs->elm_syndrome_fragment_2[i]);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:519:3: note: here
> case BCH4_ECC:
> ^~~~
> drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_save’:
> drivers/mtd/nand/raw/omap_elm.c:466:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
> regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
> ELM_SYNDROME_FRAGMENT_4 + offset);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:468:3: note: here
> case BCH8_ECC:
> ^~~~
> drivers/mtd/nand/raw/omap_elm.c:471:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
> regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
> ELM_SYNDROME_FRAGMENT_2 + offset);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:473:3: note: here
> case BCH4_ECC:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enabling
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
on nand/next.
Thanks,
Miquèl
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-01 15:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 17:49 [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-03-01 21:38 ` Gustavo A. R. Silva
2019-03-01 22:39 ` Richard Weinberger
2019-03-02 0:33 ` Gustavo A. R. Silva
2019-03-02 14:47 ` Miquel Raynal
2019-04-01 15:23 ` Miquel Raynal [this message]
2019-04-01 15:33 ` Gustavo A. R. Silva
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=20190401172309.4c6929a8@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=gustavo@embeddedor.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mcuos.com@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).