Skip to content

Commit

Permalink
x86/ioapic.c: convert io_apic_level_ack_pending loop to normal for() …
Browse files Browse the repository at this point in the history
…loop

Convert the unconventional loop in io_apic_level_ack_pending() to
a conventional for() loop.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Jeremy Fitzhardinge committed Jul 14, 2009
1 parent 8e13d69 commit d8c5206
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,23 +410,17 @@ static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
unsigned long flags;

spin_lock_irqsave(&ioapic_lock, flags);
entry = cfg->irq_2_pin;
for (;;) {
for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
unsigned int reg;
int pin;

if (!entry)
break;
pin = entry->pin;
reg = io_apic_read(entry->apic, 0x10 + pin*2);
/* Is the remote IRR bit set? */
if (reg & IO_APIC_REDIR_REMOTE_IRR) {
spin_unlock_irqrestore(&ioapic_lock, flags);
return true;
}
if (!entry->next)
break;
entry = entry->next;
}
spin_unlock_irqrestore(&ioapic_lock, flags);

Expand Down

0 comments on commit d8c5206

Please sign in to comment.