lkml.org 
[lkml]   [2008]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [MIPS] vr41xx: unsigned irq cannot be negative
Hello.

roel kluin wrote:

> unsigned irq cannot be negative
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
> index cba36a2..92dd1a0 100644
> --- a/arch/mips/vr41xx/common/irq.c
> +++ b/arch/mips/vr41xx/common/irq.c
> @@ -72,6 +72,7 @@ static void irq_dispatch(unsigned int irq)
> cascade = irq_cascade + irq;
> if (cascade->get_irq != NULL) {
> unsigned int source_irq = irq;
> + int ret;
>

Keep an empty line after the declaration block please.

> @@ -79,8 +80,9 @@ static void irq_dispatch(unsigned int irq)
> desc->chip->mask(source_irq);
> desc->chip->ack(source_irq);
> }
> - irq = cascade->get_irq(irq);
> - if (irq < 0)
> + ret = cascade->get_irq(irq);
> + irq = ret;
> + if (ret < 0)
> atomic_inc(&irq_err_count);
> else
> irq_dispatch(irq);
>

How about this:

ret = cascade->get_irq(irq);
if (ret < 0)
atomic_inc(&irq_err_count);
else
irq_dispatch(ret);


WBR, Sergei




\
 
 \ /
  Last update: 2008-09-16 12:47    [W:0.070 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site