]> Git Repo - linux.git/commitdiff
eeprom: at25: mark expected switch fall-throughs
authorGustavo A. R. Silva <[email protected]>
Tue, 3 Jul 2018 22:47:36 +0000 (17:47 -0500)
committerGreg Kroah-Hartman <[email protected]>
Sat, 7 Jul 2018 15:38:57 +0000 (17:38 +0200)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/misc/eeprom/at25.c

index 6a7d4a2ad51479624fae229023d698c58549f405..840afb398f9e4c88401484c485f5febbb836584e 100644 (file)
@@ -94,8 +94,10 @@ static int at25_ee_read(void *priv, unsigned int offset,
        switch (at25->addrlen) {
        default:        /* case 3 */
                *cp++ = offset >> 16;
+               /* fall through */
        case 2:
                *cp++ = offset >> 8;
+               /* fall through */
        case 1:
        case 0: /* can't happen: for better codegen */
                *cp++ = offset >> 0;
@@ -180,8 +182,10 @@ static int at25_ee_write(void *priv, unsigned int off, void *val, size_t count)
                switch (at25->addrlen) {
                default:        /* case 3 */
                        *cp++ = offset >> 16;
+                       /* fall through */
                case 2:
                        *cp++ = offset >> 8;
+                       /* fall through */
                case 1:
                case 0: /* can't happen: for better codegen */
                        *cp++ = offset >> 0;
This page took 0.074454 seconds and 4 git commands to generate.