[PATCH 2/6] MIPS: ip27-timer: fix unsigned irq < 0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Roel Kluin
Date: Tuesday, April 15, 2008 - 6:43 pm

irq is unsigned, cast to signed to evaluate the allocate_irqno() return value,
    
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---   
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 25d3baf..3c08afd 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -222,19 +222,19 @@ static void __init hub_rt_clock_event_global_init(void)
 	unsigned int irq;
 
 	do {
 		smp_wmb();
 		irq = rt_timer_irq;
 		if (irq)
 			break;
 
 		irq = allocate_irqno();
-		if (irq < 0)
+		if ((int) irq < 0)
 			panic("Allocation of irq number for timer failed");
 	} while (xchg(&rt_timer_irq, irq));
 
 	set_irq_chip_and_handler(irq, &rt_irq_type, handle_percpu_irq);
 	setup_irq(irq, &hub_rt_irqaction);
 }
 
 static cycle_t hub_rt_read(void)
 {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/6] MIPS: ip27-timer: fix unsigned irq < 0, Roel Kluin, (Tue Apr 15, 6:43 pm)
Re: [PATCH 2/6] MIPS: ip27-timer: fix unsigned irq &lt; 0, Thomas Bogendoerfer, (Wed Apr 16, 2:15 am)
Re: [PATCH 2/6 v2] MIPS: ip27-timer: unsigned irq to evalu ..., Thomas Bogendoerfer, (Wed Apr 16, 3:27 pm)