Commit cded19f3 authored by Hannes Eder's avatar Hannes Eder Committed by Avi Kivity

KVM: fix sparse warnings: Should it be static?

Impact: Make symbols static.

Fix this sparse warnings:
  arch/x86/kvm/mmu.c:992:5: warning: symbol 'mmu_pages_add' was not declared. Should it be static?
  arch/x86/kvm/mmu.c:1124:5: warning: symbol 'mmu_pages_next' was not declared. Should it be static?
  arch/x86/kvm/mmu.c:1144:6: warning: symbol 'mmu_pages_clear_parents' was not declared. Should it be static?
  arch/x86/kvm/x86.c:2037:5: warning: symbol 'kvm_read_guest_virt' was not declared. Should it be static?
  arch/x86/kvm/x86.c:2067:5: warning: symbol 'kvm_write_guest_virt' was not declared. Should it be static?
  virt/kvm/irq_comm.c:220:5: warning: symbol 'setup_routing_entry' was not declared. Should it be static?
Signed-off-by: default avatarHannes Eder <hannes@hanneseder.net>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent d7364a29
...@@ -989,8 +989,8 @@ struct kvm_mmu_pages { ...@@ -989,8 +989,8 @@ struct kvm_mmu_pages {
idx < 512; \ idx < 512; \
idx = find_next_bit(bitmap, 512, idx+1)) idx = find_next_bit(bitmap, 512, idx+1))
int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp,
int idx) int idx)
{ {
int i; int i;
...@@ -1121,8 +1121,9 @@ struct mmu_page_path { ...@@ -1121,8 +1121,9 @@ struct mmu_page_path {
i < pvec.nr && ({ sp = pvec.page[i].sp; 1;}); \ i < pvec.nr && ({ sp = pvec.page[i].sp; 1;}); \
i = mmu_pages_next(&pvec, &parents, i)) i = mmu_pages_next(&pvec, &parents, i))
int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, static int mmu_pages_next(struct kvm_mmu_pages *pvec,
int i) struct mmu_page_path *parents,
int i)
{ {
int n; int n;
...@@ -1141,7 +1142,7 @@ int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, ...@@ -1141,7 +1142,7 @@ int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents,
return n; return n;
} }
void mmu_pages_clear_parents(struct mmu_page_path *parents) static void mmu_pages_clear_parents(struct mmu_page_path *parents)
{ {
struct kvm_mmu_page *sp; struct kvm_mmu_page *sp;
unsigned int level = 0; unsigned int level = 0;
......
...@@ -2043,8 +2043,8 @@ static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu, ...@@ -2043,8 +2043,8 @@ static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu,
return dev; return dev;
} }
int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, static int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes,
struct kvm_vcpu *vcpu) struct kvm_vcpu *vcpu)
{ {
void *data = val; void *data = val;
int r = X86EMUL_CONTINUE; int r = X86EMUL_CONTINUE;
...@@ -2073,8 +2073,8 @@ int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, ...@@ -2073,8 +2073,8 @@ int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes,
return r; return r;
} }
int kvm_write_guest_virt(gva_t addr, void *val, unsigned int bytes, static int kvm_write_guest_virt(gva_t addr, void *val, unsigned int bytes,
struct kvm_vcpu *vcpu) struct kvm_vcpu *vcpu)
{ {
void *data = val; void *data = val;
int r = X86EMUL_CONTINUE; int r = X86EMUL_CONTINUE;
......
...@@ -233,8 +233,8 @@ void kvm_free_irq_routing(struct kvm *kvm) ...@@ -233,8 +233,8 @@ void kvm_free_irq_routing(struct kvm *kvm)
__kvm_free_irq_routing(&kvm->irq_routing); __kvm_free_irq_routing(&kvm->irq_routing);
} }
int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, static int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e,
const struct kvm_irq_routing_entry *ue) const struct kvm_irq_routing_entry *ue)
{ {
int r = -EINVAL; int r = -EINVAL;
int delta; int delta;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment