lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 535b6429 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge

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

Use a conventional for() loop in replace_pin_at_irq_node().
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 875e68ec
...@@ -515,10 +515,10 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node, ...@@ -515,10 +515,10 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
int oldapic, int oldpin, int oldapic, int oldpin,
int newapic, int newpin) int newapic, int newpin)
{ {
struct irq_pin_list *entry = cfg->irq_2_pin; struct irq_pin_list *entry;
int replaced = 0; int replaced = 0;
while (entry) { for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
if (entry->apic == oldapic && entry->pin == oldpin) { if (entry->apic == oldapic && entry->pin == oldpin) {
entry->apic = newapic; entry->apic = newapic;
entry->pin = newpin; entry->pin = newpin;
...@@ -526,7 +526,6 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node, ...@@ -526,7 +526,6 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
/* every one is different, right? */ /* every one is different, right? */
break; break;
} }
entry = entry->next;
} }
/* why? call replace before add? */ /* why? call replace before add? */
......
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