Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8c52063 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge
Browse files

x86/ioapic.c: convert io_apic_level_ack_pending loop to normal for() loop



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

Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 8e13d697
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -410,13 +410,10 @@ static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
	unsigned long flags;
	unsigned long flags;


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


		if (!entry)
			break;
		pin = entry->pin;
		pin = entry->pin;
		reg = io_apic_read(entry->apic, 0x10 + pin*2);
		reg = io_apic_read(entry->apic, 0x10 + pin*2);
		/* Is the remote IRR bit set? */
		/* Is the remote IRR bit set? */
@@ -424,9 +421,6 @@ static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
			spin_unlock_irqrestore(&ioapic_lock, flags);
			spin_unlock_irqrestore(&ioapic_lock, flags);
			return true;
			return true;
		}
		}
		if (!entry->next)
			break;
		entry = entry->next;
	}
	}
	spin_unlock_irqrestore(&ioapic_lock, flags);
	spin_unlock_irqrestore(&ioapic_lock, flags);