Bug 80531

Summary: xen/events/events_base.c:249: pointless test ?
Product: Drivers Reporter: David Binderman (dcb314)
Component: OtherAssignee: drivers_other
Status: NEW ---    
Severity: low CC: andrey_utkin
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.16-rc5 Subsystem:
Regression: No Bisected commit-id:

Description David Binderman 2014-07-17 14:57:18 UTC
[linux-3.16-rc5/drivers/xen/events/events_base.c:249]: (style) Checking if unsigned variable 'irq' is less than zero.

    if (unlikely(WARN(irq < 0 || irq >= nr_irqs, "Invalid irq %d!\n", irq)))
        return 0;

Suggest new code

    if (unlikely(WARN(irq >= nr_irqs, "Invalid irq %d!\n", irq)))
        return 0;
Comment 1 Andrey Utkin 2014-07-17 16:32:20 UTC
Thanks. https://patchwork.kernel.org/patch/4577041/