2014-07-17 16:26:04

by Andrey Utkin

[permalink] [raw]
Subject: [PATCH 1/4] drivers/xen/events/events_base.c: drop negativity check of unsigned parameter

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80531
Reported-by: David Binderman <[email protected]>
Signed-off-by: Andrey Utkin <[email protected]>
---
drivers/xen/events/events_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index c919d3d..5b5c5ff 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -246,7 +246,7 @@ static void xen_irq_info_cleanup(struct irq_info *info)
*/
unsigned int evtchn_from_irq(unsigned irq)
{
- if (unlikely(WARN(irq < 0 || irq >= nr_irqs, "Invalid irq %d!\n", irq)))
+ if (unlikely(WARN(irq >= nr_irqs, "Invalid irq %d!\n", irq)))
return 0;

return info_for_irq(irq)->evtchn;
--
1.8.5.5


2014-07-31 17:58:59

by David Vrabel

[permalink] [raw]
Subject: Re: [PATCH 1/4] drivers/xen/events/events_base.c: drop negativity check of unsigned parameter

On 17/07/14 17:25, Andrey Utkin wrote:
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80531
> Reported-by: David Binderman <[email protected]>
> Signed-off-by: Andrey Utkin <[email protected]>

Applied to devel/for-linus-3.17.

Thanks.

David