diff options
author | Nathan Chancellor <nathan@kernel.org> | 2022-03-22 08:29:06 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-03-29 13:21:18 -0400 |
commit | 07ea4ab1f9b83953ff5c3f6ccfb84d581bfe0046 (patch) | |
tree | 042807dc73ffe1fc60c037a39aa133af6d4f28b6 /arch/x86/kvm/xen.c | |
parent | 70375c2d8fa3fb9b0b59207a9c5df1e2e1205c10 (diff) | |
download | linux-07ea4ab1f9b83953ff5c3f6ccfb84d581bfe0046.tar.bz2 |
KVM: x86: Fix clang -Wimplicit-fallthrough in do_host_cpuid()
Clang warns:
arch/x86/kvm/cpuid.c:739:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
default:
^
arch/x86/kvm/cpuid.c:739:2: note: insert 'break;' to avoid fall-through
default:
^
break;
1 error generated.
Clang is a little more pedantic than GCC, which does not warn when
falling through to a case that is just break or return. Clang's version
is more in line with the kernel's own stance in deprecated.rst, which
states that all switch/case blocks must end in either break,
fallthrough, continue, goto, or return. Add the missing break to silence
the warning.
Fixes: f144c49e8c39 ("KVM: x86: synthesize CPUID leaf 0x80000021h if useful")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Message-Id: <20220322152906.112164-1-nathan@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/xen.c')
0 files changed, 0 insertions, 0 deletions