All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: roel kluin <roel.kluin@gmail.com>
Cc: ralf@linux-mips.org, yoichi_yuasa@tripeaks.co.jp,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [MIPS] vr41xx: unsigned irq cannot be negative
Date: Tue, 16 Sep 2008 14:44:21 +0400	[thread overview]
Message-ID: <48CF8E05.6050000@ru.mvista.com> (raw)
In-Reply-To: <48CF02EE.8050406@gmail.com>

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

  parent reply	other threads:[~2008-09-16 10:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16  0:50 [PATCH] [MIPS] vr41xx: unsigned irq cannot be negative roel kluin
2008-09-16  2:02 ` Yoichi Yuasa
2008-09-16  8:58 ` Ralf Baechle
2008-09-16 10:44 ` Sergei Shtylyov [this message]
2008-09-17  1:54   ` roel kluin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48CF8E05.6050000@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=roel.kluin@gmail.com \
    --cc=yoichi_yuasa@tripeaks.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.