diff mbox series

[1/4] MIPS: kvm: Declare prototype for kvm_init_loongson_ipi

Message ID 20240507-loongson64-warnings-v1-1-2cad88344e9e@flygoat.com (mailing list archive)
State New, archived
Headers show
Series MIPS: Loongson64: Sweeping build warnings | expand

Commit Message

Jiaxun Yang May 7, 2024, 6:51 p.m. UTC
Declear prototype for kvm_init_loongson_ipi in interrupt.h.

Fix warning:
arch/mips/kvm/loongson_ipi.c:190:6: warning: no previous prototype for ‘kvm_init_loongson_ipi’ [-Wmissing-prototypes]
  190 | void kvm_init_loongson_ipi(struct kvm *kvm)
      |      ^~~~~~~~~~~~~~~~~~~~~

Fixes: f21db3090de2 ("KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support")
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/kvm/interrupt.h    | 4 ++++
 arch/mips/kvm/loongson_ipi.c | 2 ++
 arch/mips/kvm/mips.c         | 2 --
 3 files changed, 6 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé May 27, 2024, 12:32 p.m. UTC | #1
On 7/5/24 20:51, Jiaxun Yang wrote:
> Declear prototype for kvm_init_loongson_ipi in interrupt.h.
> 
> Fix warning:
> arch/mips/kvm/loongson_ipi.c:190:6: warning: no previous prototype for ‘kvm_init_loongson_ipi’ [-Wmissing-prototypes]
>    190 | void kvm_init_loongson_ipi(struct kvm *kvm)
>        |      ^~~~~~~~~~~~~~~~~~~~~
> 
> Fixes: f21db3090de2 ("KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support")
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>   arch/mips/kvm/interrupt.h    | 4 ++++
>   arch/mips/kvm/loongson_ipi.c | 2 ++
>   arch/mips/kvm/mips.c         | 2 --
>   3 files changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/arch/mips/kvm/interrupt.h b/arch/mips/kvm/interrupt.h
index e529ea2bb34b..07bc0160bc94 100644
--- a/arch/mips/kvm/interrupt.h
+++ b/arch/mips/kvm/interrupt.h
@@ -37,3 +37,7 @@  u32 kvm_irq_to_priority(u32 irq);
 int kvm_mips_pending_timer(struct kvm_vcpu *vcpu);
 
 void kvm_mips_deliver_interrupts(struct kvm_vcpu *vcpu, u32 cause);
+
+#ifdef CONFIG_CPU_LOONGSON64
+extern void kvm_init_loongson_ipi(struct kvm *kvm);
+#endif
diff --git a/arch/mips/kvm/loongson_ipi.c b/arch/mips/kvm/loongson_ipi.c
index 5d53f32d837c..6ac83a31148c 100644
--- a/arch/mips/kvm/loongson_ipi.c
+++ b/arch/mips/kvm/loongson_ipi.c
@@ -10,6 +10,8 @@ 
 
 #include <linux/kvm_host.h>
 
+#include "interrupt.h"
+
 #define IPI_BASE            0x3ff01000ULL
 
 #define CORE0_STATUS_OFF       0x000
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index 231ac052b506..56fedfbe9455 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -135,8 +135,6 @@  void kvm_arch_hardware_disable(void)
 	kvm_mips_callbacks->hardware_disable();
 }
 
-extern void kvm_init_loongson_ipi(struct kvm *kvm);
-
 int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
 {
 	switch (type) {