Skip to content

Commit

Permalink
x86/ioapic.c: convert replace_pin_at_irq_node to conventional for() loop
Browse files Browse the repository at this point in the history
Use a conventional for() loop in replace_pin_at_irq_node().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Jeremy Fitzhardinge committed Jul 14, 2009
1 parent 875e68e commit 535b642
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,18 +515,17 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
int oldapic, int oldpin,
int newapic, int newpin)
{
struct irq_pin_list *entry = cfg->irq_2_pin;
struct irq_pin_list *entry;
int replaced = 0;

while (entry) {
for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
if (entry->apic == oldapic && entry->pin == oldpin) {
entry->apic = newapic;
entry->pin = newpin;
replaced = 1;
/* every one is different, right? */
break;
}
entry = entry->next;
}

/* why? call replace before add? */
Expand Down

0 comments on commit 535b642

Please sign in to comment.