aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqnr.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-21 09:49:59 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-21 09:54:40 -0400
commite9f95e637320efe1936b647308ddf4ec5b8e0311 (patch)
tree0b192bfac0d0a8e696c039c067a20c0126fae641 /include/linux/irqnr.h
parent0b3682ba33c59a362901b478bdab965da888b350 (diff)
genirq: fix off by one and coding style
Fix off-by-one in for_each_irq_desc_reverse(). Impact is near zero in practice, because nothing substantial wants to iterate down to IRQ#0 - but fix it nevertheless. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irqnr.h')
-rw-r--r--include/linux/irqnr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index 3171ddc3b39d..452c280c8115 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -13,9 +13,9 @@ extern int nr_irqs;
13# define for_each_irq_desc(irq, desc) \ 13# define for_each_irq_desc(irq, desc) \
14 for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++) 14 for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
15 15
16# define for_each_irq_desc_reverse(irq, desc) \ 16# define for_each_irq_desc_reverse(irq, desc) \
17 for (irq = nr_irqs -1, desc = irq_desc + (nr_irqs -1 ); \ 17 for (irq = nr_irqs - 1, desc = irq_desc + (nr_irqs - 1); \
18 irq > 0; irq--, desc--) 18 irq >= 0; irq--, desc--)
19#endif 19#endif
20 20
21#define for_each_irq_nr(irq) \ 21#define for_each_irq_nr(irq) \