[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49336BB8.4020303@kernel.org>
Date: Sun, 30 Nov 2008 20:44:40 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] irq: sparse irq_desc[] support - fix
Impact: fix warning
remove unneeded warning
Signed-off-by: Yinghai Lu <yinghai@...nel.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists