diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2008-12-26 12:29:48 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-26 09:48:18 +0100 |
commit | 18eefedfe8ad33e8fc7614c13359e29a9fab4644 (patch) | |
tree | e0b7c801c27a3933137e7e4056a3bca3c3244744 /include/linux/irqnr.h | |
parent | 26ddd8d5cac8a563953d5febe8c6e40909f7bce1 (diff) | |
download | linux-18eefedfe8ad33e8fc7614c13359e29a9fab4644.tar.gz linux-18eefedfe8ad33e8fc7614c13359e29a9fab4644.tar.bz2 linux-18eefedfe8ad33e8fc7614c13359e29a9fab4644.zip |
irq: simplify for_each_irq_desc() usage
Impact: cleanup
all for_each_irq_desc() usage point have !desc check.
then its check can move into for_each_irq_desc() macro.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r-- | include/linux/irqnr.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h index c4a59c7a478b..5504a5c97836 100644 --- a/include/linux/irqnr.h +++ b/include/linux/irqnr.h @@ -22,10 +22,14 @@ extern struct irq_desc *irq_to_desc(unsigned int irq); # define for_each_irq_desc(irq, desc) \ for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \ - irq++, desc = irq_to_desc(irq)) + irq++, desc = irq_to_desc(irq)) \ + if (desc) + + # define for_each_irq_desc_reverse(irq, desc) \ for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \ - irq--, desc = irq_to_desc(irq)) + irq--, desc = irq_to_desc(irq)) \ + if (desc) #endif /* CONFIG_GENERIC_HARDIRQS */ |