kdb: kdb_keyboard: mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sun, 5 Aug 2018 04:18:25 +0000 (23:18 -0500)
committerDaniel Thompson <daniel.thompson@linaro.org>
Tue, 13 Nov 2018 20:38:50 +0000 (20:38 +0000)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced the code comments with
a proper "fall through" annotation, which is what GCC is expecting
to find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
kernel/debug/kdb/kdb_keyboard.c

index 118527aa60eae183f6d3b882ff2102a0c9a6012a..750497b0003a6decd80a97051aec97347079fd93 100644 (file)
@@ -173,11 +173,11 @@ int kdb_get_kbd_char(void)
        case KT_LATIN:
                if (isprint(keychar))
                        break;          /* printable characters */
-               /* drop through */
+               /* fall through */
        case KT_SPEC:
                if (keychar == K_ENTER)
                        break;
-               /* drop through */
+               /* fall through */
        default:
                return -1;      /* ignore unprintables */
        }