Commit 638f2f8c authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge

x86/ioapic.c: convert __target_IO_APIC_irq to conventional for() loop

Use a normal for() loop in __target_IO_APIC_irq().
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 4eea6fff
...@@ -2236,13 +2236,9 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq ...@@ -2236,13 +2236,9 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq
struct irq_pin_list *entry; struct irq_pin_list *entry;
u8 vector = cfg->vector; u8 vector = cfg->vector;
entry = cfg->irq_2_pin; for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
for (;;) {
unsigned int reg; unsigned int reg;
if (!entry)
break;
apic = entry->apic; apic = entry->apic;
pin = entry->pin; pin = entry->pin;
/* /*
...@@ -2255,9 +2251,6 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq ...@@ -2255,9 +2251,6 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, struct irq
reg &= ~IO_APIC_REDIR_VECTOR_MASK; reg &= ~IO_APIC_REDIR_VECTOR_MASK;
reg |= vector; reg |= vector;
io_apic_modify(apic, 0x10 + pin*2, reg); io_apic_modify(apic, 0x10 + pin*2, reg);
if (!entry->next)
break;
entry = entry->next;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment