kvm: x86: Fix -Wmissing-prototypes warnings
authorYi Wang <wang.yi59@zte.com.cn>
Wed, 10 Jul 2019 00:24:03 +0000 (08:24 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Jul 2019 14:35:58 +0000 (16:35 +0200)
commitcdc238eb72f6b94b6c33b98c07b9fc3ac5e57b18
treed668000c672afccc8790df2b7de18ddba45f834e
parentb614c6027896ff9ad6757122e84760d938cab15e
kvm: x86: Fix -Wmissing-prototypes warnings

We get a warning when build kernel W=1:

arch/x86/kvm/../../../virt/kvm/eventfd.c:48:1: warning: no previous prototype for ‘kvm_arch_irqfd_allowed’ [-Wmissing-prototypes]
 kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args)
 ^

The reason is kvm_arch_irqfd_allowed() is declared in arch/x86/kvm/irq.h,
which is not included by eventfd.c. Considering kvm_arch_irqfd_allowed()
is a weakly defined function in eventfd.c, remove the declaration to
kvm_host.h can fix this.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/irq.h
include/linux/kvm_host.h