[PATCH] irq: sparse irq_desc[] support - fix

From: Yinghai Lu
Date: Sun Nov 30 2008 - 23:48:19 EST



Impact: fix warning

remove unneeded warning

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/