arch/x86/kvm: beautify source code for __u32 irq which is never < 0
PATCH 1/1 arch/x86/kvm: beautify source code for __u32 irq which is never < 0
irp->irq is __u32 which is never < 0.
Signed-off-by Chen Gang <[email protected]>
--- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/x86.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.7.6
Gleb Natapov
AppliedQuoted 4 lines · Chen Gang
irp->irqis__u32which is never < 0.Signed-off-by Chen Gang <[email protected]>
Applied, thanks.
Quoted 19 lines
--- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kvm/x86.c +1
-1@@ -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 ;Signature · 1 line
1.7.7.6
--
Gleb.
Quoted 7 lines · Gleb Natapov
Quoted 4 lines · Chen Gang
Quoted 4 lines
irp->irqis__u32which is never < 0.Signed-off-by Chen Gang <[email protected]>Applied, thanks.
thank you, too.
:-)
Signature · 3 lines
Chen Gang Asianux Corporation