objtool: Use 'the fallthrough' pseudo-keyword
authorRuan Jinjie <ruanjinjie@huawei.com>
Tue, 1 Aug 2023 03:52:30 +0000 (11:52 +0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 3 Oct 2023 19:37:35 +0000 (21:37 +0200)
Replace the existing /* fallthrough */ comments with the
new 'fallthrough' pseudo-keyword macro:

  https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
tools/objtool/arch/x86/decode.c

index c0f25d00181ec27e06eb8e6d8fc094f6dea92fd5..e327cd8271352264ff2eb389d82948d502f77465 100644 (file)
@@ -291,7 +291,7 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
                switch (modrm_reg & 7) {
                case 5:
                        imm = -imm;
-                       /* fallthrough */
+                       fallthrough;
                case 0:
                        /* add/sub imm, %rsp */
                        ADD_OP(op) {
@@ -375,7 +375,7 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
                        break;
                }
 
-               /* fallthrough */
+               fallthrough;
        case 0x88:
                if (!rex_w)
                        break;
@@ -656,7 +656,7 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
                        break;
                }
 
-               /* fallthrough */
+               fallthrough;
 
        case 0xca: /* retf */
        case 0xcb: /* retf */