diff mbox series

[v3,next] ubi: Fix fall-through warnings for Clang

Message ID 20210305082832.GA137724@embeddedor
State Accepted
Delegated to: Richard Weinberger
Headers show
Series [v3,next] ubi: Fix fall-through warnings for Clang | expand

Commit Message

Gustavo A. R. Silva March 5, 2021, 8:28 a.m. UTC
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Changes in v3:
 Update the changelog text according to the actual code change.

Changes in v2:
 Make use of a break statement instead of fallthrough, for consistency.
 Link: https://lore.kernel.org/lkml/20201123093347.719a77cf@xps13/

 drivers/mtd/ubi/build.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index f399edc82191..a7e3eb9befb6 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1350,6 +1350,7 @@  static int bytes_str_to_int(const char *str)
 	case 'K':
 		result *= 1024;
+		break;
 	case '\0':