[U-Boot] [PATCH v6 23/31] cmd: mtdparts: add fallthrough in switch statement

Miquel Raynal miquel.raynal at bootlin.com
Thu Aug 16 15:30:21 UTC 2018


Switch blocks for deriving size naturally use fallthrough between
'case' statements. Make it explicit.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
 cmd/mtdparts.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index 0da3afd75f..756fc6018f 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -177,13 +177,16 @@ static u64 memsize_parse (const char *const ptr, const char **retptr)
 		case 'G':
 		case 'g':
 			ret <<= 10;
+			/* Fallthrough */
 		case 'M':
 		case 'm':
 			ret <<= 10;
+			/* Fallthrough */
 		case 'K':
 		case 'k':
 			ret <<= 10;
 			(*retptr)++;
+			/* Fallthrough */
 		default:
 			break;
 	}
-- 
2.17.1



More information about the U-Boot mailing list