]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
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)
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

index fd210cdd49839dea0f33367376e13a089177c3af..d5005cc265217c4fa4d5de7c2ecc2a29fb599c19 100644 (file)
@@ -114,7 +114,6 @@ static inline int irqchip_in_kernel(struct kvm *kvm)
        return mode != KVM_IRQCHIP_NONE;
 }
 
-bool kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args);
 void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu);
 void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu);
 void kvm_apic_nmi_wd_deliver(struct kvm_vcpu *vcpu);
index abafddb9fe2c4e796ec826ecd96f314d155981c4..b91829ee3db122ddc49eb7193d2ee3c6c12f3dc3 100644 (file)
@@ -993,6 +993,7 @@ void kvm_unregister_irq_ack_notifier(struct kvm *kvm,
                                   struct kvm_irq_ack_notifier *kian);
 int kvm_request_irq_source_id(struct kvm *kvm);
 void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id);
+bool kvm_arch_irqfd_allowed(struct kvm *kvm, struct kvm_irqfd *args);
 
 /*
  * search_memslots() and __gfn_to_memslot() are here because they are