Bug 80531 - xen/events/events_base.c:249: pointless test ?
Summary: xen/events/events_base.c:249: pointless test ?
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 low
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-17 14:57 UTC by David Binderman
Modified: 2014-07-17 16:32 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.16-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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/

Note You need to log in before you can comment on or make changes to this bug.