[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1631330841-3507-1-git-send-email-18341265598@163.com>
Date: Sat, 11 Sep 2021 11:27:21 +0800
From: 18341265598@....com
To: Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Zhaoge Zhang <18341265598@....com>
Subject: [PATCH] kvm: x86: i8259: Converts mask values to logical binary values.
From: Zhaoge Zhang <18341265598@....com>
Signed-off-by: Zhaoge Zhang <18341265598@....com>
---
arch/x86/kvm/i8259.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index 0b80263..a8f1d60 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -92,7 +92,7 @@ static inline int pic_set_irq1(struct kvm_kpic_state *s, int irq, int level)
mask = 1 << irq;
if (s->elcr & mask) /* level triggered */
if (level) {
- ret = !(s->irr & mask);
+ ret = !!!(s->irr & mask);
s->irr |= mask;
s->last_irr |= mask;
} else {
@@ -102,7 +102,7 @@ static inline int pic_set_irq1(struct kvm_kpic_state *s, int irq, int level)
else /* edge triggered */
if (level) {
if ((s->last_irr & mask) == 0) {
- ret = !(s->irr & mask);
+ ret = !!!(s->irr & mask);
s->irr |= mask;
}
s->last_irr |= mask;
--
2.7.4
Powered by blists - more mailing lists