mtd: onenand_base: Mark expected switch fall-through
Subsystems (3)
PATCH 1/1 mtd: onenand_base: Mark expected switch fall-through
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/onenand/onenand_base.c: In function ‘onenand_check_features’:drivers/mtd/nand/onenand/onenand_base.c:3264:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
this->options |= ONENAND_HAS_NOP_1;drivers/mtd/nand/onenand/onenand_base.c:3265:2: note: here
case ONENAND_DEVICE_DENSITY_4Gb:
^~~~
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
--- drivers/mtd/nand/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/nand/onenand/onenand_base.c +1 -0
@@ -3262,6 +3262,7 @@ static void onenand_check_features(struct mtd_info *mtd)switch (density) {case ONENAND_DEVICE_DENSITY_8Gb: this->options |=ONENAND_HAS_NOP_1 ; +/* fall through */ case ONENAND_DEVICE_DENSITY_4Gb:if (ONENAND_IS_DDP (this)) this->options |=ONENAND_HAS_2PLANE ;
Signature · 1 line
2.21.0
Quoted 12 lines · Gustavo A. R. Silva
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/onenand/onenand_base.c: In function ‘onenand_check_features’:drivers/mtd/nand/onenand/onenand_base.c:3264:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
this->options|=ONENAND_HAS_NOP_1;drivers/mtd/nand/onenand/onenand_base.c:3265:2: note: here
caseONENAND_DEVICE_DENSITY_4Gb:
^~~~
Quoted 7 lines
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Cc Jonathan Bakker <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>
-Kees
Quoted 19 lines
--- drivers/mtd/nand/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+)drivers/mtd/nand/onenand/onenand_base.c +1
-0@@ -3262,6 +3262,7 @@ static void onenand_check_features(struct mtd_info *mtd)switch (density) {case ONENAND_DEVICE_DENSITY_8Gb: this->options |=ONENAND_HAS_NOP_1 ; +/* fall through */ case ONENAND_DEVICE_DENSITY_4Gb:if (ONENAND_IS_DDP (this)) this->options |=ONENAND_HAS_2PLANE ;Signature · 1 line
2.21.0
Signature · 1 line
Kees Cook
Hi all,
Friendly ping:
Who can take this?
Thanks
--
Gustavo
Quoted 45 lines · Kees Cook
Quoted 12 lines · Gustavo A. R. Silva
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/onenand/onenand_base.c: In function ‘onenand_check_features’:drivers/mtd/nand/onenand/onenand_base.c:3264:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
this->options|=ONENAND_HAS_NOP_1;drivers/mtd/nand/onenand/onenand_base.c:3265:2: note: here
caseONENAND_DEVICE_DENSITY_4Gb:
^~~~Quoted 7 lines
Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Cc Jonathan Bakker <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>Reviewed-by Kees Cook <[email protected]>-Kees
Quoted 19 lines
--- drivers/mtd/nand/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+)drivers/mtd/nand/onenand/onenand_base.c +1
-0@@ -3262,6 +3262,7 @@ static void onenand_check_features(struct mtd_info *mtd)switch (density) {case ONENAND_DEVICE_DENSITY_8Gb: this->options |=ONENAND_HAS_NOP_1 ; +/* fall through */ case ONENAND_DEVICE_DENSITY_4Gb:if (ONENAND_IS_DDP (this)) this->options |=ONENAND_HAS_2PLANE ;Signature · 1 line
2.21.0
Miquel Raynal
maintainerHi Gustavo,
"Gustavo A. R. Silva" <[email protected]> wrote on Wed, 26 Jun 2019 13:16:22 -0500:
Quoted 5 lines
Hi all,
Friendly ping:
Who can take this?
I am queuing it right now, please be patient.
Also for next time, the prefix should have been "mtd: onenand:" but that's ok, I edited the title.
Thanks,
Miquèl
Hi Gustavo,
"Gustavo A. R. Silva" <[email protected]> wrote on Tue, 4 Jun 2019 09:17:37 -0500:
Quoted 28 lines
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/onenand/onenand_base.c: In function ‘onenand_check_features’:drivers/mtd/nand/onenand/onenand_base.c:3264:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
this->options|=ONENAND_HAS_NOP_1;drivers/mtd/nand/onenand/onenand_base.c:3265:2: note: here
caseONENAND_DEVICE_DENSITY_4Gb:
^~~~Warning level 3 was used: -Wimplicit-fallthrough=3
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Cc Jonathan Bakker <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/mtd/nand/onenand/onenand_base.c | 1 + 1 file changed, 1 insertion(+)drivers/mtd/nand/onenand/onenand_base.c +0
-0
drivers/mtd/nand/onenand/onenand_base.c static void onenand_check_features(struct mtd_info *mtd) · line 3268
Quoted 7 lines
drivers/mtd/nand/onenand/onenand_base.c +1
-0@@ -3262,6 +3262,7 @@ static void onenand_check_features(struct mtd_info *mtd)switch (density) {case ONENAND_DEVICE_DENSITY_8Gb: this->options |=ONENAND_HAS_NOP_1 ; +/* fall through */ case ONENAND_DEVICE_DENSITY_4Gb:if (ONENAND_IS_DDP (this)) this->options |=ONENAND_HAS_2PLANE ;
Applied to nand/next, thanks.
Miquèl