lkml.org 
[lkml]   [2008]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/6] MIPS: ip27-timer: fix unsigned irq < 0
From
On Wed, Apr 16, 2008 at 03:43:56AM +0200, Roel Kluin wrote:
> 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)

Why don't you just make irq and rt_timer_irq an int ?

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]


\
 
 \ /
  Last update: 2008-04-16 11:19    [W:0.043 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site