linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds
@ 2018-02-22 12:05 Sebastian Ott
  2018-02-23 15:21 ` Christian Borntraeger
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Ott @ 2018-02-22 12:05 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář; +Cc: kvm, linux-kernel

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?

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
---
 include/linux/kvm_host.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ed3d4ddbaff3..6930c63126c7 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -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)
 {
 	/*
-- 
2.13.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds
  2018-02-22 12:05 [PATCH] kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds Sebastian Ott
@ 2018-02-23 15:21 ` Christian Borntraeger
  2018-02-23 18:05   ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Borntraeger @ 2018-02-23 15:21 UTC (permalink / raw)
  To: Sebastian Ott, Paolo Bonzini, Radim Krčmář
  Cc: kvm, linux-kernel

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

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

On 02/22/2018 01:05 PM, Sebastian Ott wrote:
> 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?
> 
> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
> ---
>  include/linux/kvm_host.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index ed3d4ddbaff3..6930c63126c7 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -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)
>  {
>  	/*
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds
  2018-02-23 15:21 ` Christian Borntraeger
@ 2018-02-23 18:05   ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2018-02-23 18:05 UTC (permalink / raw)
  To: Christian Borntraeger, Sebastian Ott, Radim Krčmář
  Cc: kvm, linux-kernel

On 23/02/2018 16:21, Christian Borntraeger wrote:
> 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
> 
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

Queued, thanks for the review!

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-23 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 12:05 [PATCH] kvm: fix warning for CONFIG_HAVE_KVM_EVENTFD builds Sebastian Ott
2018-02-23 15:21 ` Christian Borntraeger
2018-02-23 18:05   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).