mtd: block2mtd: mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 9 Aug 2018 16:05:13 +0000 (11:05 -0500)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Fri, 9 Nov 2018 19:32:43 +0000 (20:32 +0100)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 402015 ("Missing break in switch")
Addresses-Coverity-ID: 402016 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/devices/block2mtd.c

index c9e4249..410a321 100644 (file)
@@ -329,8 +329,10 @@ static int ustrtoul(const char *cp, char **endp, unsigned int base)
        switch (**endp) {
        case 'G' :
                result *= 1024;
+               /* fall through */
        case 'M':
                result *= 1024;
+               /* fall through */
        case 'K':
        case 'k':
                result *= 1024;