Commit 3b4a5058 authored by Alok N Kataria's avatar Alok N Kataria Committed by Ingo Molnar

x86, kvm: Fix intialization warnings in kvm.c

With commit:

  4cca6ea0 ("x86/apic: Allow x2apic without IR on VMware platform")

we started seeing "incompatible initialization" warning messages,
since x2apic_available() expects a bool return type while
kvm_para_available() returns an int.

Reported by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarAlok N Kataria <akataria@vmware.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 5ca72c4f
...@@ -85,13 +85,13 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1, ...@@ -85,13 +85,13 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1,
return ret; return ret;
} }
static inline int kvm_para_available(void) static inline bool kvm_para_available(void)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
char signature[13]; char signature[13];
if (boot_cpu_data.cpuid_level < 0) if (boot_cpu_data.cpuid_level < 0)
return 0; /* So we don't blow up on old processors */ return false; /* So we don't blow up on old processors */
if (cpu_has_hypervisor) { if (cpu_has_hypervisor) {
cpuid(KVM_CPUID_SIGNATURE, &eax, &ebx, &ecx, &edx); cpuid(KVM_CPUID_SIGNATURE, &eax, &ebx, &ecx, &edx);
...@@ -101,10 +101,10 @@ static inline int kvm_para_available(void) ...@@ -101,10 +101,10 @@ static inline int kvm_para_available(void)
signature[12] = 0; signature[12] = 0;
if (strcmp(signature, "KVMKVMKVM") == 0) if (strcmp(signature, "KVMKVMKVM") == 0)
return 1; return true;
} }
return 0; return false;
} }
static inline unsigned int kvm_arch_para_features(void) static inline unsigned int kvm_arch_para_features(void)
......
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