kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds
PATCH 1/1 kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds
Move the kvm_arch_irq_routing_update() prototype outside of ifdef CONFIG_HAVE_KVM_EVENTFD guards to fix the following sparse warning:
arch/s390/kvm/../../../virt/kvm/irqchip.c:171:28: warning: symbol 'kvm_arch_irq_routing_update' was not declared. Should it be static?
--- include/linux/kvm_host.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/kvm_host.h +2 -1
@@ -1105,7 +1105,6 @@ static inline void kvm_irq_routing_update(struct kvm *kvm) { }#endif -void kvm_arch_irq_routing_update (struct kvm *kvm);static inline int kvm_ioeventfd (struct kvm *kvm,struct kvm_ioeventfd *args) {
@@ -1114,6 +1113,8 @@ static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)#endif /* CONFIG_HAVE_KVM_EVENTFD */ +void kvm_arch_irq_routing_update (struct kvm *kvm); +static inline void kvm_make_request (int req,struct kvm_vcpu *vcpu) {/*
Signature · 1 line
2.13.4
I can see this warnings as well and yes, kvm_arch_irq_routing_update seems to be available for CONFIG_HAVE_KVM_EVENTFD=y and =n.
Seems that irqchip.c is compile independly from CONFIG_HAVE_KVM_EVENTFD,
so
Quoted 32 lines · Sebastian Ott
Move the
kvm_arch_irq_routing_update()prototype outside of ifdefCONFIG_HAVE_KVM_EVENTFDguards to fix the following sparse warning:
arch/s390/kvm/../../../virt/kvm/irqchip.c:171:28: warning: symbol 'kvm_arch_irq_routing_update' was not declared. Should it be static?Signed-off-by Sebastian Ott <[email protected]>--- include/linux/kvm_host.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/kvm_host.h +2
-1@@ -1105,7 +1105,6 @@ static inline void kvm_irq_routing_update(struct kvm *kvm) { }#endif -void kvm_arch_irq_routing_update (struct kvm *kvm);static inline int kvm_ioeventfd (struct kvm *kvm,struct kvm_ioeventfd *args) {@@ -1114,6 +1113,8 @@ static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)#endif /* CONFIG_HAVE_KVM_EVENTFD */ +void kvm_arch_irq_routing_update (struct kvm *kvm); +static inline void kvm_make_request (int req,struct kvm_vcpu *vcpu) {/*
Quoted 7 lines · Christian Borntraeger
I can see this warnings as well and yes,
kvm_arch_irq_routing_updateseems to be available forCONFIG_HAVE_KVM_EVENTFD=yand =n.
Seems thatirqchip.cis compile independly fromCONFIG_HAVE_KVM_EVENTFD,so
Queued, thanks for the review!
Paolo