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>
This commit is contained in:
parent
0b3682ba33
commit
e9f95e6373
|
@ -36,7 +36,7 @@ void ack_bad_irq(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
# define irq_stats(x) (&per_cpu(irq_stat,x))
|
# define irq_stats(x) (&per_cpu(irq_stat, x))
|
||||||
#else
|
#else
|
||||||
# define irq_stats(x) cpu_pda(x)
|
# define irq_stats(x) cpu_pda(x)
|
||||||
#endif
|
#endif
|
||||||
|
@ -113,7 +113,7 @@ int show_interrupts(struct seq_file *p, void *v)
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
seq_printf(p, " ");
|
seq_printf(p, " ");
|
||||||
for_each_online_cpu(j)
|
for_each_online_cpu(j)
|
||||||
seq_printf(p, "CPU%-8d",j);
|
seq_printf(p, "CPU%-8d", j);
|
||||||
seq_putc(p, '\n');
|
seq_putc(p, '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ extern int nr_irqs;
|
||||||
for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
|
for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
|
||||||
|
|
||||||
# define for_each_irq_desc_reverse(irq, desc) \
|
# define for_each_irq_desc_reverse(irq, desc) \
|
||||||
for (irq = nr_irqs -1, desc = irq_desc + (nr_irqs -1 ); \
|
for (irq = nr_irqs - 1, desc = irq_desc + (nr_irqs - 1); \
|
||||||
irq > 0; irq--, desc--)
|
irq >= 0; irq--, desc--)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define for_each_irq_nr(irq) \
|
#define for_each_irq_nr(irq) \
|
||||||
|
|
Loading…
Reference in New Issue