Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: PPC: Book3S: Fix symbol undeclared warnings

Build the kernel with `C=2`:
arch/powerpc/kvm/book3s_hv_nested.c:572:25: warning: symbol
'kvmhv_alloc_nested' was not declared. Should it be static?
arch/powerpc/kvm/book3s_64_mmu_radix.c:350:6: warning: symbol
'kvmppc_radix_set_pte_at' was not declared. Should it be static?
arch/powerpc/kvm/book3s_hv.c:3568:5: warning: symbol
'kvmhv_p9_guest_entry' was not declared. Should it be static?
arch/powerpc/kvm/book3s_hv_rm_xics.c:767:15: warning: symbol 'eoi_rc'
was not declared. Should it be static?
arch/powerpc/kvm/book3s_64_vio_hv.c:240:13: warning: symbol
'iommu_tce_kill_rm' was not declared. Should it be static?
arch/powerpc/kvm/book3s_64_vio.c:492:6: warning: symbol
'kvmppc_tce_iommu_do_map' was not declared. Should it be static?
arch/powerpc/kvm/book3s_pr.c:572:6: warning: symbol 'kvmppc_set_pvr_pr'
was not declared. Should it be static?

Those symbols are used only in the files that define them so make them
static to fix the warnings.

Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>

authored by

Wang Wensheng and committed by
Paul Mackerras
cf59eb13 eb173559

+7 -7
+1 -1
arch/powerpc/kvm/book3s_64_mmu_radix.c
··· 347 347 return __radix_pte_update(ptep, clr, set); 348 348 } 349 349 350 - void kvmppc_radix_set_pte_at(struct kvm *kvm, unsigned long addr, 350 + static void kvmppc_radix_set_pte_at(struct kvm *kvm, unsigned long addr, 351 351 pte_t *ptep, pte_t pte) 352 352 { 353 353 radix__set_pte_at(kvm->mm, addr, ptep, pte, 0);
+1 -1
arch/powerpc/kvm/book3s_64_vio.c
··· 489 489 return ret; 490 490 } 491 491 492 - long kvmppc_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl, 492 + static long kvmppc_tce_iommu_do_map(struct kvm *kvm, struct iommu_table *tbl, 493 493 unsigned long entry, unsigned long ua, 494 494 enum dma_data_direction dir) 495 495 {
+1 -1
arch/powerpc/kvm/book3s_64_vio_hv.c
··· 237 237 return ret; 238 238 } 239 239 240 - extern void iommu_tce_kill_rm(struct iommu_table *tbl, 240 + static void iommu_tce_kill_rm(struct iommu_table *tbl, 241 241 unsigned long entry, unsigned long pages) 242 242 { 243 243 if (tbl->it_ops->tce_kill)
+1 -1
arch/powerpc/kvm/book3s_hv.c
··· 3568 3568 * Virtual-mode guest entry for POWER9 and later when the host and 3569 3569 * guest are both using the radix MMU. The LPIDR has already been set. 3570 3570 */ 3571 - int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, 3571 + static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, 3572 3572 unsigned long lpcr) 3573 3573 { 3574 3574 struct kvmppc_vcore *vc = vcpu->arch.vcore;
+1 -1
arch/powerpc/kvm/book3s_hv_nested.c
··· 569 569 kvmhv_set_nested_ptbl(gp); 570 570 } 571 571 572 - struct kvm_nested_guest *kvmhv_alloc_nested(struct kvm *kvm, unsigned int lpid) 572 + static struct kvm_nested_guest *kvmhv_alloc_nested(struct kvm *kvm, unsigned int lpid) 573 573 { 574 574 struct kvm_nested_guest *gp; 575 575 long shadow_lpid;
+1 -1
arch/powerpc/kvm/book3s_hv_rm_xics.c
··· 764 764 return ics_rm_eoi(vcpu, irq); 765 765 } 766 766 767 - unsigned long eoi_rc; 767 + static unsigned long eoi_rc; 768 768 769 769 static void icp_eoi(struct irq_chip *c, u32 hwirq, __be32 xirr, bool *again) 770 770 {
+1 -1
arch/powerpc/kvm/book3s_pr.c
··· 569 569 #endif 570 570 } 571 571 572 - void kvmppc_set_pvr_pr(struct kvm_vcpu *vcpu, u32 pvr) 572 + static void kvmppc_set_pvr_pr(struct kvm_vcpu *vcpu, u32 pvr) 573 573 { 574 574 u32 host_pvr; 575 575