Commit 551912d2 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Paolo Bonzini

KVM: x86: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple
of warnings by explicitly adding break statements instead of just letting
the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Message-Id: <20210528200756.GA39320@embeddedor>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 02ffbe63
...@@ -655,6 +655,7 @@ static int __do_cpuid_func_emulated(struct kvm_cpuid_array *array, u32 func) ...@@ -655,6 +655,7 @@ static int __do_cpuid_func_emulated(struct kvm_cpuid_array *array, u32 func)
if (kvm_cpu_cap_has(X86_FEATURE_RDTSCP)) if (kvm_cpu_cap_has(X86_FEATURE_RDTSCP))
entry->ecx = F(RDPID); entry->ecx = F(RDPID);
++array->nent; ++array->nent;
break;
default: default:
break; break;
} }
......
...@@ -6247,6 +6247,7 @@ void vmx_set_virtual_apic_mode(struct kvm_vcpu *vcpu) ...@@ -6247,6 +6247,7 @@ void vmx_set_virtual_apic_mode(struct kvm_vcpu *vcpu)
switch (kvm_get_apic_mode(vcpu)) { switch (kvm_get_apic_mode(vcpu)) {
case LAPIC_MODE_INVALID: case LAPIC_MODE_INVALID:
WARN_ONCE(true, "Invalid local APIC state"); WARN_ONCE(true, "Invalid local APIC state");
break;
case LAPIC_MODE_DISABLED: case LAPIC_MODE_DISABLED:
break; break;
case LAPIC_MODE_XAPIC: case LAPIC_MODE_XAPIC:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment