Skip to contentSkip to conversation

mips: annotate implicit fall throughs

PATCH In review Mathieu Malaterre 3 participants 4 messages Dec 3, 2018 – Dec 7, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: annotate implicit fall throughs

There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings. Fix them up.

---
 drivers/mtd/nand/raw/jz4780_bch.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/jz4780_bch.c +2 -0
index 731c6051d91e..7201827809e9 100644
@@ -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;
Signature · 1 line
2.19.2
#1 lore raw

Hi Mathieu,

The subject prefix should be "mtd: rawnand: jz4780:" not "mips:"

Regards,

Boris

Quoted 23 lines · On Mon, 3 Dec 2018 22:22:13 +0100 Mathieu Malaterre <[email protected]> wrote:

There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings. Fix them up.

---
 drivers/mtd/nand/raw/jz4780_bch.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/jz4780_bch.c +2 -0
index 731c6051d91e..7201827809e9 100644
@@ -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;
#2 lore raw

PATCH v2 1/1 mtd: rawnand: jz4780: annotate implicit fall throughs

In reply to Mathieu Malaterre

There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings. Fix them up.

---
v2: fix subject prefix non sense

 drivers/mtd/nand/raw/jz4780_bch.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/jz4780_bch.c +2 -0
index 731c6051d91e..7201827809e9 100644
@@ -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;
Signature · 1 line
2.19.2
maintainer Applied
#3 lore raw

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

Hi Mathieu,

Mathieu Malaterre <[email protected]> wrote on Tue, 4 Dec 2018 21:10:57 +0100:

Quoted 15 lines

There is a plan to build the kernel with -Wimplicit-fallthrough and these places in the code produced warnings. Fix them up.

---
v2: fix subject prefix non sense

 drivers/mtd/nand/raw/jz4780_bch.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mtd/nand/raw/jz4780_bch.c +0 -0
index 731c6051d91e..7201827809e9 100644

drivers/mtd/nand/raw/jz4780_bch.c static void jz4780_bch_read_parity(struct jz4780_bch *bch, void *buf, · line 145

Quoted 10 lines
drivers/mtd/nand/raw/jz4780_bch.c +2 -0
@@ -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