Skip to contentSkip to conversation

x86/apic/32: Fix yet another implicit fallthrough warning

PATCH New Borislav Petkov 2 participants 2 messages Aug 11, 2019 – Aug 12, 2019 x86

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 x86/apic/32: Fix yet another implicit fallthrough warning

From: Borislav Petkov <[email protected]>

Fix

arch/x86/kernel/apic/probe_32.c: In function ‘default_setup_apic_routing’:
arch/x86/kernel/apic/probe_32.c:146:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

      if (!APIC_XAPIC(version)) {
         ^

arch/x86/kernel/apic/probe_32.c:151:3: note: here
case X86_VENDOR_HYGON:
^~~~

for 32-bit builds.

---
 arch/x86/kernel/apic/probe_32.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/probe_32.c +2 -1
index 0ac9fd667c99..67b33d67002f 100644
@@ -147,7 +147,8 @@ void __init default_setup_apic_routing(void)
 				def_to_bigsmp = 0;
 				break;
 			}
-			/* If P4 and above fall through */
+			/* P4 and above */
+			/* fall through */
 		case X86_VENDOR_HYGON:
 		case X86_VENDOR_AMD:
 			def_to_bigsmp = 1;
Signature · 1 line
2.21.0
#1 lore raw
x86/apic/32: Fix yet another implicit fallthrough warning
Commit-ID:  5785675dfef4f9edcee66edef7b3af21618d2707
Gitweb:     https://git.kernel.org/tip/5785675dfef4f9edcee66edef7b3af21618d2707
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sun, 11 Aug 2019 17:40:36 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 12 Aug 2019 20:35:04 +0200

x86/apic/32: Fix yet another implicit fallthrough warning

Fix

arch/x86/kernel/apic/probe_32.c: In function ‘default_setup_apic_routing’:
arch/x86/kernel/apic/probe_32.c:146:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

      if (!APIC_XAPIC(version)) {
         ^

arch/x86/kernel/apic/probe_32.c:151:3: note: here
case X86_VENDOR_HYGON:
^~~~

for 32-bit builds.

---
 arch/x86/kernel/apic/probe_32.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/probe_32.c +2 -1
index 1492799b8f43..ee2d91e382f1 100644
@@ -184,7 +184,8 @@ void __init default_setup_apic_routing(void)
 				def_to_bigsmp = 0;
 				break;
 			}
-			/* If P4 and above fall through */
+			/* P4 and above */
+			/* fall through */
 		case X86_VENDOR_HYGON:
 		case X86_VENDOR_AMD:
 			def_to_bigsmp = 1;