diff mbox series

[v2] mtd: rawnand: jz4780: annotate implicit fall throughs

Message ID 20181204201057.30733-1-malat@debian.org
State Accepted
Delegated to: Miquel Raynal
Headers show
Series [v2] mtd: rawnand: jz4780: annotate implicit fall throughs | expand

Commit Message

Mathieu Malaterre Dec. 4, 2018, 8:10 p.m. UTC
There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings. Fix them up.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: fix subject prefix non sense

 drivers/mtd/nand/raw/jz4780_bch.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Miquel Raynal Dec. 7, 2018, 6:51 p.m. UTC | #1
Hi Mathieu,

Mathieu Malaterre <malat@debian.org> wrote on Tue,  4 Dec 2018 21:10:57
+0100:

> There is a plan to build the kernel with -Wimplicit-fallthrough and
> these places in the code produced warnings. Fix them up.
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
> v2: fix subject prefix non sense
> 
>  drivers/mtd/nand/raw/jz4780_bch.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/jz4780_bch.c b/drivers/mtd/nand/raw/jz4780_bch.c
> index 731c6051d91e..7201827809e9 100644
> --- a/drivers/mtd/nand/raw/jz4780_bch.c
> +++ b/drivers/mtd/nand/raw/jz4780_bch.c
> @@ -136,8 +136,10 @@ static void jz4780_bch_read_parity(struct jz4780_bch *bch, void *buf,
>  	switch (size8) {
>  	case 3:
>  		dest8[2] = (val >> 16) & 0xff;
> +		/* fall through */
>  	case 2:
>  		dest8[1] = (val >> 8) & 0xff;
> +		/* fall through */
>  	case 1:
>  		dest8[0] = val & 0xff;
>  		break;

Applied to nand/next.


Thanks,
Miquèl
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/jz4780_bch.c b/drivers/mtd/nand/raw/jz4780_bch.c
index 731c6051d91e..7201827809e9 100644
--- a/drivers/mtd/nand/raw/jz4780_bch.c
+++ b/drivers/mtd/nand/raw/jz4780_bch.c
@@ -136,8 +136,10 @@  static void jz4780_bch_read_parity(struct jz4780_bch *bch, void *buf,
 	switch (size8) {
 	case 3:
 		dest8[2] = (val >> 16) & 0xff;
+		/* fall through */
 	case 2:
 		dest8[1] = (val >> 8) & 0xff;
+		/* fall through */
 	case 1:
 		dest8[0] = val & 0xff;
 		break;