From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Mathieu Malaterre <malat@debian.org>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mtd: Annotate implicit fall through in nand_scan_tail
Date: Fri, 25 Jan 2019 13:36:31 +0100 [thread overview]
Message-ID: <20190125133631.48a32268@xps13> (raw)
In-Reply-To: <20190116195004.2499-2-malat@debian.org>
Hi Mathieu,
Mathieu Malaterre <malat@debian.org> wrote on Wed, 16 Jan 2019 20:50:04
+0100:
> There is a plan to build the kernel with -Wimplicit-fallthrough and
> these places in the code produced warnings (W=1).
>
> This commit removes the following warnings:
>
> drivers/mtd/nand/raw/nand_base.c:5556:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> drivers/mtd/nand/raw/nand_base.c:5575:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> drivers/mtd/nand/raw/nand_base.c:5613:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> drivers/mtd/nand/raw/nand_base.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
> index cca4b24d2ffa..da344c276088 100644
> --- a/drivers/mtd/nand/raw/nand_base.c
> +++ b/drivers/mtd/nand/raw/nand_base.c
> @@ -5555,6 +5555,7 @@ static int nand_scan_tail(struct nand_chip *chip)
> }
> if (!ecc->read_page)
> ecc->read_page = nand_read_page_hwecc_oob_first;
> + /* fall through */
>
> case NAND_ECC_HW:
> /* Use standard hwecc read page function? */
> @@ -5574,6 +5575,7 @@ static int nand_scan_tail(struct nand_chip *chip)
> ecc->read_subpage = nand_read_subpage;
> if (!ecc->write_subpage && ecc->hwctl && ecc->calculate)
> ecc->write_subpage = nand_write_subpage_hwecc;
> + /* fall through */
>
> case NAND_ECC_HW_SYNDROME:
> if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) &&
> @@ -5611,6 +5613,7 @@ static int nand_scan_tail(struct nand_chip *chip)
> ecc->size, mtd->writesize);
> ecc->mode = NAND_ECC_SOFT;
> ecc->algo = NAND_ECC_HAMMING;
> + /* fall through */
>
> case NAND_ECC_SOFT:
> ret = nand_set_ecc_soft_ops(chip);
Applied to nand/next with the subject prefix being "mtd: rawnand:"
Thanks,
Miquèl
next prev parent reply other threads:[~2019-01-25 12:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 19:50 [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp Mathieu Malaterre
2019-01-16 19:50 ` [PATCH 2/2] mtd: Annotate implicit fall through in nand_scan_tail Mathieu Malaterre
2019-01-25 12:36 ` Miquel Raynal [this message]
2019-01-25 12:36 ` [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp Miquel Raynal
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=20190125133631.48a32268@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=malat@debian.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