Fix various W=1 warnings in booke.c:

  arch/powerpc/kvm/booke.c:626:6: error: no previous prototype for 
‘kvmppc_watchdog_func’ [-Werror=missing-prototypes]
    626 | void kvmppc_watchdog_func(struct timer_list *t)
        |      ^~~~~~~~~~~~~~~~~~~~
  arch/powerpc/kvm/booke.c:1008:5: error: no previous prototype for 
‘kvmppc_handle_exit’ [-Werror=missing-prototypes]
   1008 | int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr)
        |     ^~~~~~~~~~~~~~~~~~
  arch/powerpc/kvm/booke.c:1949:6: error: no previous prototype for 
‘kvm_guest_protect_msr’ [-Werror=missing-prototypes]
   1949 | void kvm_guest_protect_msr(struct kvm_vcpu *vcpu, ulong prot_bitmap, 
bool set)
        |      ^~~~~~~~~~~~~~~~~~~~~
  arch/powerpc/kvm/booke.c:1009: warning: Function parameter or member 'vcpu' 
not described in 'kvmppc_handle_exit'
  arch/powerpc/kvm/booke.c:1009: warning: Function parameter or member 
'exit_nr' not described in 'kvmppc_handle_exit'

Reported-by: kernel test robot <l...@intel.com>
Link: https://lore.kernel.org/r/202304020827.3lez86wb-...@intel.com/
Signed-off-by: Michael Ellerman <m...@ellerman.id.au>
---
 arch/powerpc/kvm/booke.c | 7 ++++---
 arch/powerpc/kvm/booke.h | 3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 01adffb24667..5908f2cc6a81 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -623,7 +623,7 @@ static void arm_next_watchdog(struct kvm_vcpu *vcpu)
        spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags);
 }
 
-void kvmppc_watchdog_func(struct timer_list *t)
+static void kvmppc_watchdog_func(struct timer_list *t)
 {
        struct kvm_vcpu *vcpu = from_timer(vcpu, t, arch.wdt_timer);
        u32 tsr, new_tsr;
@@ -1000,7 +1000,7 @@ static int kvmppc_resume_inst_load(struct kvm_vcpu *vcpu,
        }
 }
 
-/**
+/*
  * kvmppc_handle_exit
  *
  * Return value is in the form (errcode<<2 | RESUME_FLAG_HOST | RESUME_FLAG_NV)
@@ -1946,7 +1946,8 @@ static int kvmppc_booke_add_watchpoint(struct debug_reg 
*dbg_reg, uint64_t addr,
        dbg_reg->dbcr0 |= DBCR0_IDM;
        return 0;
 }
-void kvm_guest_protect_msr(struct kvm_vcpu *vcpu, ulong prot_bitmap, bool set)
+
+static void kvm_guest_protect_msr(struct kvm_vcpu *vcpu, ulong prot_bitmap, 
bool set)
 {
        /* XXX: Add similar MSR protection for BookE-PR */
 #ifdef CONFIG_KVM_BOOKE_HV
diff --git a/arch/powerpc/kvm/booke.h b/arch/powerpc/kvm/booke.h
index be9da96d9f06..9c5b8e76014f 100644
--- a/arch/powerpc/kvm/booke.h
+++ b/arch/powerpc/kvm/booke.h
@@ -109,4 +109,7 @@ static inline void kvmppc_clear_dbsr(void)
 {
        mtspr(SPRN_DBSR, mfspr(SPRN_DBSR));
 }
+
+int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr);
+
 #endif /* __KVM_BOOKE_H__ */
-- 
2.39.2

Reply via email to