From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] irq: sparse irq_desc[] support - fix
Date: Sun, 30 Nov 2008 20:44:40 -0800 [thread overview]
Message-ID: <49336BB8.4020303@kernel.org> (raw)
In-Reply-To: <20081129102619.GA3901@elte.hu>
Impact: fix warning
remove unneeded warning
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 2861122..8aa0954 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -158,13 +158,7 @@ void __init early_irq_init(void)
struct irq_desc *irq_to_desc(unsigned int irq)
{
- if (irq >= NR_IRQS) {
- printk(KERN_WARNING "irq >= NR_IRQS in irq_to_desc: %d %d\n",
- irq, NR_IRQS);
- WARN_ON(1);
- return NULL;
- }
- return irq_desc_ptrs[irq];
+ return (irq < NR_IRQS) ? irq_desc_ptrs[irq] : NULL;
}
struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
next prev parent reply other threads:[~2008-12-01 4:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 2:59 [PATCH 1/2] irq: sparseirq enabling Yinghai Lu
2008-11-24 14:40 ` Ingo Molnar
2008-11-24 19:22 ` Yinghai Lu
2008-11-24 22:26 ` Thomas Gleixner
2008-11-25 3:57 ` [PATCH 1/2] irq: sparseirq enabling v2 Yinghai Lu
2008-11-25 3:58 ` [PATCH 2/2] irq: move irq_desc according to smp_affinity v2 Yinghai Lu
2008-11-26 7:48 ` [PATCH 1/2] irq: sparseirq enabling v2 Ingo Molnar
2008-11-26 8:02 ` Yinghai Lu
2008-11-26 8:17 ` Ingo Molnar
2008-11-26 18:33 ` Yinghai Lu
2008-11-27 2:26 ` [PATCH 1/2] irq: sparseirq enabling v3 Yinghai Lu
2008-11-27 2:26 ` [PATCH 2/2] irq: move irq_desc according to smp_affinity v3 Yinghai Lu
2008-11-28 16:34 ` [PATCH 1/2] irq: sparseirq enabling v3 Ingo Molnar
2008-11-29 7:13 ` [PATCH] irq: sparseirq enabling v4 Yinghai Lu
2008-11-29 10:02 ` Ingo Molnar
2008-11-29 10:26 ` Ingo Molnar
2008-12-01 4:44 ` Yinghai Lu [this message]
2008-11-29 10:57 ` Sam Ravnborg
2008-11-29 14:33 ` Ingo Molnar
2008-11-29 17:54 ` Sam Ravnborg
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=49336BB8.4020303@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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.