* [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp
@ 2019-01-16 19:50 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 ` [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp Miquel Raynal
0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Malaterre @ 2019-01-16 19:50 UTC (permalink / raw)
To: Boris Brezillon
Cc: Mathieu Malaterre, Miquel Raynal, Richard Weinberger,
David Woodhouse, Brian Norris, Marek Vasut, linux-mtd,
linux-kernel
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_legacy.c:332:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/mtd/nand/raw/nand_legacy.c:483:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
drivers/mtd/nand/raw/nand_legacy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/nand_legacy.c b/drivers/mtd/nand/raw/nand_legacy.c
index 43575943f13b..f2526ec616a6 100644
--- a/drivers/mtd/nand/raw/nand_legacy.c
+++ b/drivers/mtd/nand/raw/nand_legacy.c
@@ -331,6 +331,7 @@ static void nand_command(struct nand_chip *chip, unsigned int command,
*/
if (column == -1 && page_addr == -1)
return;
+ /* fall through */
default:
/*
@@ -483,7 +484,7 @@ static void nand_command_lp(struct nand_chip *chip, unsigned int command,
chip->legacy.cmd_ctrl(chip, NAND_CMD_NONE,
NAND_NCE | NAND_CTRL_CHANGE);
- /* This applies to read commands */
+ /* fall through - This applies to read commands */
default:
/*
* If we don't have access to the busy pin, we apply the given
--
2.19.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mtd: Annotate implicit fall through in nand_scan_tail
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 ` Mathieu Malaterre
2019-01-25 12:36 ` Miquel Raynal
2019-01-25 12:36 ` [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp Miquel Raynal
1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Malaterre @ 2019-01-16 19:50 UTC (permalink / raw)
To: Boris Brezillon
Cc: Mathieu Malaterre, Miquel Raynal, Richard Weinberger,
David Woodhouse, Brian Norris, Marek Vasut, linux-mtd,
linux-kernel
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);
--
2.19.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp
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
1 sibling, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2019-01-25 12:36 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Boris Brezillon, Richard Weinberger, David Woodhouse,
Brian Norris, Marek Vasut, linux-mtd, linux-kernel
Hi Mathieu,
Mathieu Malaterre <malat@debian.org> wrote on Wed, 16 Jan 2019 20:50:03
+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_legacy.c:332:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> drivers/mtd/nand/raw/nand_legacy.c:483:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> drivers/mtd/nand/raw/nand_legacy.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/nand_legacy.c b/drivers/mtd/nand/raw/nand_legacy.c
> index 43575943f13b..f2526ec616a6 100644
> --- a/drivers/mtd/nand/raw/nand_legacy.c
> +++ b/drivers/mtd/nand/raw/nand_legacy.c
> @@ -331,6 +331,7 @@ static void nand_command(struct nand_chip *chip, unsigned int command,
> */
> if (column == -1 && page_addr == -1)
> return;
> + /* fall through */
>
> default:
> /*
> @@ -483,7 +484,7 @@ static void nand_command_lp(struct nand_chip *chip, unsigned int command,
> chip->legacy.cmd_ctrl(chip, NAND_CMD_NONE,
> NAND_NCE | NAND_CTRL_CHANGE);
>
> - /* This applies to read commands */
> + /* fall through - This applies to read commands */
> default:
> /*
> * If we don't have access to the busy pin, we apply the given
Applied to nand/next with the subject prefix being "mtd: rawnand:"
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] mtd: Annotate implicit fall through in nand_scan_tail
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
0 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2019-01-25 12:36 UTC (permalink / raw)
To: Mathieu Malaterre
Cc: Boris Brezillon, Richard Weinberger, David Woodhouse,
Brian Norris, Marek Vasut, linux-mtd, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-25 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-01-25 12:36 ` [PATCH 1/2] mtd: Annotate implicit fall through in nand_command/nand_command_lp Miquel Raynal
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).