public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/x86/kvm: beautify source code for __u32 irq which is never < 0
@ 2013-02-27  3:33 Chen Gang
  2013-02-27 14:08 ` Gleb Natapov
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-02-27  3:33 UTC (permalink / raw)
  To: mtosatti, gleb, tglx, mingo@redhat.com, hpa; +Cc: x86, kvm


  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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-05  0:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27  3:33 [PATCH] arch/x86/kvm: beautify source code for __u32 irq which is never < 0 Chen Gang
2013-02-27 14:08 ` Gleb Natapov
2013-03-05  0:55   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox