All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roel Kluin <12o3l@tiscali.nl>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/6] MIPS: ip27-timer: fix unsigned irq < 0
Date: Wed, 16 Apr 2008 03:43:56 +0200	[thread overview]
Message-ID: <480559DC.2060807@tiscali.nl> (raw)

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)
 {

             reply	other threads:[~2008-04-16  1:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16  1:43 Roel Kluin [this message]
2008-04-16  9:15 ` [PATCH 2/6] MIPS: ip27-timer: fix unsigned irq < 0 Thomas Bogendoerfer
2008-04-16 15:09   ` [PATCH 2/6 v2] MIPS: ip27-timer: unsigned irq to evaluate allocate_irqno() Roel Kluin
2008-04-16 22:27     ` Thomas Bogendoerfer
2008-04-17 10:59       ` Ralf Baechle

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=480559DC.2060807@tiscali.nl \
    --to=12o3l@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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.