* [PATCH 0/2] KVM: fix sparse warnings
@ 2009-02-21 1:17 ` Hannes Eder
0 siblings, 0 replies; 8+ messages in thread
From: Hannes Eder @ 2009-02-21 1:17 UTC (permalink / raw)
To: Avi Kivity; +Cc: kernel-janitors, linux-kernel
The following fix some sparse warnings in KVM.
---
Hannes Eder (2):
KVM: fix sparse warnings: Should it be static?
KVM: fix sparse warnings: context imbalance
arch/x86/kvm/i8259.c | 2 ++
arch/x86/kvm/mmu.c | 11 ++++++-----
arch/x86/kvm/x86.c | 8 ++++----
virt/kvm/irq_comm.c | 4 ++--
4 files changed, 14 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 0/2] KVM: fix sparse warnings @ 2009-02-21 1:17 ` Hannes Eder 0 siblings, 0 replies; 8+ messages in thread From: Hannes Eder @ 2009-02-21 1:17 UTC (permalink / raw) To: Avi Kivity; +Cc: kernel-janitors, linux-kernel The following fix some sparse warnings in KVM. --- Hannes Eder (2): KVM: fix sparse warnings: Should it be static? KVM: fix sparse warnings: context imbalance arch/x86/kvm/i8259.c | 2 ++ arch/x86/kvm/mmu.c | 11 ++++++----- arch/x86/kvm/x86.c | 8 ++++---- virt/kvm/irq_comm.c | 4 ++-- 4 files changed, 14 insertions(+), 11 deletions(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] KVM: fix sparse warnings: context imbalance 2009-02-21 1:17 ` Hannes Eder @ 2009-02-21 1:18 ` Hannes Eder -1 siblings, 0 replies; 8+ messages in thread From: Hannes Eder @ 2009-02-21 1:18 UTC (permalink / raw) To: Avi Kivity; +Cc: kernel-janitors, linux-kernel Impact: Attribute function with __acquires(...) resp. __releases(...). Fix this sparse warnings: arch/x86/kvm/i8259.c:34:13: warning: context imbalance in 'pic_lock' - wrong count at exit arch/x86/kvm/i8259.c:39:13: warning: context imbalance in 'pic_unlock' - unexpected unlock Signed-off-by: Hannes Eder <hannes@hanneseder.net> --- arch/x86/kvm/i8259.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 9316037..a095415 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -32,11 +32,13 @@ #include <linux/kvm_host.h> static void pic_lock(struct kvm_pic *s) + __acquires(&s->lock) { spin_lock(&s->lock); } static void pic_unlock(struct kvm_pic *s) + __releases(&s->lock) { struct kvm *kvm = s->kvm; unsigned acks = s->pending_acks; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] KVM: fix sparse warnings: context imbalance @ 2009-02-21 1:18 ` Hannes Eder 0 siblings, 0 replies; 8+ messages in thread From: Hannes Eder @ 2009-02-21 1:18 UTC (permalink / raw) To: Avi Kivity; +Cc: kernel-janitors, linux-kernel Impact: Attribute function with __acquires(...) resp. __releases(...). Fix this sparse warnings: arch/x86/kvm/i8259.c:34:13: warning: context imbalance in 'pic_lock' - wrong count at exit arch/x86/kvm/i8259.c:39:13: warning: context imbalance in 'pic_unlock' - unexpected unlock Signed-off-by: Hannes Eder <hannes@hanneseder.net> --- arch/x86/kvm/i8259.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 9316037..a095415 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -32,11 +32,13 @@ #include <linux/kvm_host.h> static void pic_lock(struct kvm_pic *s) + __acquires(&s->lock) { spin_lock(&s->lock); } static void pic_unlock(struct kvm_pic *s) + __releases(&s->lock) { struct kvm *kvm = s->kvm; unsigned acks = s->pending_acks; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] KVM: fix sparse warnings: Should it be static? 2009-02-21 1:17 ` Hannes Eder @ 2009-02-21 1:19 ` Hannes Eder -1 siblings, 0 replies; 8+ messages in thread From: Hannes Eder @ 2009-02-21 1:19 UTC (permalink / raw) To: Avi Kivity; +Cc: kernel-janitors, linux-kernel 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: Hannes Eder <hannes@hanneseder.net> --- arch/x86/kvm/mmu.c | 11 ++++++----- arch/x86/kvm/x86.c | 8 ++++---- virt/kvm/irq_comm.c | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4a21b0f..2a36f7f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -989,8 +989,8 @@ struct kvm_mmu_pages { idx < 512; \ idx = find_next_bit(bitmap, 512, idx+1)) -int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, - int idx) +static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, + int idx) { int i; @@ -1121,8 +1121,9 @@ struct mmu_page_path { i < pvec.nr && ({ sp = pvec.page[i].sp; 1;}); \ i = mmu_pages_next(&pvec, &parents, i)) -int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, - int i) +static int mmu_pages_next(struct kvm_mmu_pages *pvec, + struct mmu_page_path *parents, + int i) { int n; @@ -1141,7 +1142,7 @@ int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, 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; unsigned int level = 0; diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 05d7be8..69ca2d1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2034,8 +2034,8 @@ static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu, return dev; } -int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, - struct kvm_vcpu *vcpu) +static int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, + struct kvm_vcpu *vcpu) { void *data = val; int r = X86EMUL_CONTINUE; @@ -2064,8 +2064,8 @@ out: return r; } -int kvm_write_guest_virt(gva_t addr, void *val, unsigned int bytes, - struct kvm_vcpu *vcpu) +static int kvm_write_guest_virt(gva_t addr, void *val, unsigned int bytes, + struct kvm_vcpu *vcpu) { void *data = val; int r = X86EMUL_CONTINUE; diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 6bc7439..c2de19b 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -217,8 +217,8 @@ void kvm_free_irq_routing(struct kvm *kvm) __kvm_free_irq_routing(&kvm->irq_routing); } -int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, - const struct kvm_irq_routing_entry *ue) +static int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, + const struct kvm_irq_routing_entry *ue) { int r = -EINVAL; int delta; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] KVM: fix sparse warnings: Should it be static? @ 2009-02-21 1:19 ` Hannes Eder 0 siblings, 0 replies; 8+ messages in thread From: Hannes Eder @ 2009-02-21 1:19 UTC (permalink / raw) To: Avi Kivity; +Cc: kernel-janitors, linux-kernel 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: Hannes Eder <hannes@hanneseder.net> --- arch/x86/kvm/mmu.c | 11 ++++++----- arch/x86/kvm/x86.c | 8 ++++---- virt/kvm/irq_comm.c | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4a21b0f..2a36f7f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -989,8 +989,8 @@ struct kvm_mmu_pages { idx < 512; \ idx = find_next_bit(bitmap, 512, idx+1)) -int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, - int idx) +static int mmu_pages_add(struct kvm_mmu_pages *pvec, struct kvm_mmu_page *sp, + int idx) { int i; @@ -1121,8 +1121,9 @@ struct mmu_page_path { i < pvec.nr && ({ sp = pvec.page[i].sp; 1;}); \ i = mmu_pages_next(&pvec, &parents, i)) -int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, - int i) +static int mmu_pages_next(struct kvm_mmu_pages *pvec, + struct mmu_page_path *parents, + int i) { int n; @@ -1141,7 +1142,7 @@ int mmu_pages_next(struct kvm_mmu_pages *pvec, struct mmu_page_path *parents, 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; unsigned int level = 0; diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 05d7be8..69ca2d1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2034,8 +2034,8 @@ static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu, return dev; } -int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, - struct kvm_vcpu *vcpu) +static int kvm_read_guest_virt(gva_t addr, void *val, unsigned int bytes, + struct kvm_vcpu *vcpu) { void *data = val; int r = X86EMUL_CONTINUE; @@ -2064,8 +2064,8 @@ out: return r; } -int kvm_write_guest_virt(gva_t addr, void *val, unsigned int bytes, - struct kvm_vcpu *vcpu) +static int kvm_write_guest_virt(gva_t addr, void *val, unsigned int bytes, + struct kvm_vcpu *vcpu) { void *data = val; int r = X86EMUL_CONTINUE; diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 6bc7439..c2de19b 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -217,8 +217,8 @@ void kvm_free_irq_routing(struct kvm *kvm) __kvm_free_irq_routing(&kvm->irq_routing); } -int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, - const struct kvm_irq_routing_entry *ue) +static int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, + const struct kvm_irq_routing_entry *ue) { int r = -EINVAL; int delta; ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] KVM: fix sparse warnings 2009-02-21 1:17 ` Hannes Eder @ 2009-02-24 10:41 ` Avi Kivity -1 siblings, 0 replies; 8+ messages in thread From: Avi Kivity @ 2009-02-24 10:41 UTC (permalink / raw) To: Hannes Eder; +Cc: kernel-janitors, linux-kernel Hannes Eder wrote: > The following fix some sparse warnings in KVM. > Applied both, thanks. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] KVM: fix sparse warnings @ 2009-02-24 10:41 ` Avi Kivity 0 siblings, 0 replies; 8+ messages in thread From: Avi Kivity @ 2009-02-24 10:41 UTC (permalink / raw) To: Hannes Eder; +Cc: kernel-janitors, linux-kernel Hannes Eder wrote: > The following fix some sparse warnings in KVM. > Applied both, thanks. -- error compiling committee.c: too many arguments to function ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-02-24 10:42 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-21 1:17 [PATCH 0/2] KVM: fix sparse warnings Hannes Eder 2009-02-21 1:17 ` Hannes Eder 2009-02-21 1:18 ` [PATCH 1/2] KVM: fix sparse warnings: context imbalance Hannes Eder 2009-02-21 1:18 ` Hannes Eder 2009-02-21 1:19 ` [PATCH 2/2] KVM: fix sparse warnings: Should it be static? Hannes Eder 2009-02-21 1:19 ` Hannes Eder 2009-02-24 10:41 ` [PATCH 0/2] KVM: fix sparse warnings Avi Kivity 2009-02-24 10:41 ` Avi Kivity
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.