提交 d7364a29 编写于 作者: H Hannes Eder 提交者: Avi Kivity

KVM: fix sparse warnings: context imbalance

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: NHannes Eder <hannes@hanneseder.net>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 41d6af11
...@@ -32,11 +32,13 @@ ...@@ -32,11 +32,13 @@
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
static void pic_lock(struct kvm_pic *s) static void pic_lock(struct kvm_pic *s)
__acquires(&s->lock)
{ {
spin_lock(&s->lock); spin_lock(&s->lock);
} }
static void pic_unlock(struct kvm_pic *s) static void pic_unlock(struct kvm_pic *s)
__releases(&s->lock)
{ {
struct kvm *kvm = s->kvm; struct kvm *kvm = s->kvm;
unsigned acks = s->pending_acks; unsigned acks = s->pending_acks;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册