linux/arch
Valdis Klētnieks 575b255c16 KVM: x86: allow compiling as non-module with W=1
Compile error with CONFIG_KVM_INTEL=y and W=1:

  CC      arch/x86/kvm/vmx/vmx.o
arch/x86/kvm/vmx/vmx.c:68:32: error: 'vmx_cpu_id' defined but not used [-Werror=unused-const-variable=]
   68 | static const struct x86_cpu_id vmx_cpu_id[] = {
      |                                ^~~~~~~~~~
cc1: all warnings being treated as errors

When building with =y, the MODULE_DEVICE_TABLE macro doesn't generate a
reference to the structure (or any code at all).  This makes W=1 compiles
unhappy.

Wrap both in a #ifdef to avoid the issue.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
[Do the same for CONFIG_KVM_AMD. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-28 10:35:37 +01:00
..
alpha Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
arc
arm Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
arm64 Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
c6x
csky
h8300
hexagon
ia64
m68k
microblaze
mips Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
nds32
nios2
openrisc
parisc
powerpc Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
riscv
s390 Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
sh
sparc Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
um
unicore32
x86 KVM: x86: allow compiling as non-module with W=1 2020-02-28 10:35:37 +01:00
xtensa
.gitignore
Kconfig