Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ubi: Mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1373884 ("Missing break in switch")
Addresses-Coverity-ID: 114869 ("Missing break in switch")
Addresses-Coverity-ID: 114870 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

authored by

Gustavo A. R. Silva and committed by
Richard Weinberger
7e5583fd 84df9525

+3
+1
drivers/mtd/ubi/attach.c
··· 1072 1072 * be a result of power cut during erasure. 1073 1073 */ 1074 1074 ai->maybe_bad_peb_count += 1; 1075 + /* fall through */ 1075 1076 case UBI_IO_BAD_HDR: 1076 1077 /* 1077 1078 * If we're facing a bad VID header we have to drop *all*
+2
drivers/mtd/ubi/build.c
··· 1334 1334 switch (*endp) { 1335 1335 case 'G': 1336 1336 result *= 1024; 1337 + /* fall through */ 1337 1338 case 'M': 1338 1339 result *= 1024; 1340 + /* fall through */ 1339 1341 case 'K': 1340 1342 result *= 1024; 1341 1343 if (endp[1] == 'i' && endp[2] == 'B')