From: Chen Gang <gang.chen@asianux.com>
To: mtosatti@redhat.com, gleb@redhat.com, tglx@linutronix.de,
"mingo@redhat.com" <mingo@redhat.com>,
hpa@zytor.com
Cc: x86@kernel.org, kvm@vger.kernel.org
Subject: [PATCH] arch/x86/kvm: beautify source code for __u32 irq which is never < 0
Date: Wed, 27 Feb 2013 11:33:25 +0800 [thread overview]
Message-ID: <512D7E85.6060204@asianux.com> (raw)
irp->irq is __u32 which is never < 0.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
arch/x86/kvm/x86.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f71500a..811c5c9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2700,7 +2700,7 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
struct kvm_interrupt *irq)
{
- if (irq->irq < 0 || irq->irq >= KVM_NR_INTERRUPTS)
+ if (irq->irq >= KVM_NR_INTERRUPTS)
return -EINVAL;
if (irqchip_in_kernel(vcpu->kvm))
return -ENXIO;
--
1.7.7.6
next reply other threads:[~2013-02-27 3:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 3:33 Chen Gang [this message]
2013-02-27 14:08 ` [PATCH] arch/x86/kvm: beautify source code for __u32 irq which is never < 0 Gleb Natapov
2013-03-05 0:55 ` Chen Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512D7E85.6060204@asianux.com \
--to=gang.chen@asianux.com \
--cc=gleb@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox