[PATCH 15/16] x86/ioapic.c: convert __target_IO_APIC_irq to conventional for() loop

Jeremy Fitzhardinge
2009-06-16T20:17:54Z

Use a normal for() loop in __target_IO_APIC_irq().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
arch/x86/kernel/apic/io_apic.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index f466a1e..377aac3 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2234,13 +2234,9 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq
struct irq_pin_list *entry;
u8 vector = cfg->vector;

- entry = cfg->irq_2_pin;
- for (;;) {
+ for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
unsigned int reg;

- if (!entry)
- break;
-
apic = entry->apic;
pin = entry->pin;
/*
@@ -2253,9 +2249,6 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq
reg &= ~IO_APIC_REDIR_VECTOR_MASK;
reg |= vector;
io_apic_modify(apic, 0x10 + pin*2, reg);
- if (!entry->next)
- break;
- entry = entry->next;
}
}

--
1.6.2.2