From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] arch/x86/kvm: beautify source code for __u32 irq which is never < 0 Date: Wed, 27 Feb 2013 16:08:56 +0200 Message-ID: <20130227140856.GM23616@redhat.com> References: <512D7E85.6060204@asianux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: mtosatti@redhat.com, tglx@linutronix.de, "mingo@redhat.com" , hpa@zytor.com, x86@kernel.org, kvm@vger.kernel.org To: Chen Gang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33964 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565Ab3B0OJK (ORCPT ); Wed, 27 Feb 2013 09:09:10 -0500 Content-Disposition: inline In-Reply-To: <512D7E85.6060204@asianux.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 27, 2013 at 11:33:25AM +0800, Chen Gang wrote: > > irp->irq is __u32 which is never < 0. > > Signed-off-by: Chen Gang Applied, thanks. > --- > 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 -- Gleb.