From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: [PATCH] arch/x86/kvm: beautify source code for __u32 irq which is never < 0 Date: Wed, 27 Feb 2013 11:33:25 +0800 Message-ID: <512D7E85.6060204@asianux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: x86@kernel.org, kvm@vger.kernel.org To: mtosatti@redhat.com, gleb@redhat.com, tglx@linutronix.de, "mingo@redhat.com" , hpa@zytor.com Return-path: Received: from intranet.asianux.com ([58.214.24.6]:16922 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755666Ab3B0Ddp (ORCPT ); Tue, 26 Feb 2013 22:33:45 -0500 Sender: kvm-owner@vger.kernel.org List-ID: irp->irq is __u32 which is never < 0. Signed-off-by: Chen Gang --- 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