@@ -528,20 +528,13 @@ static void mpic_smp_cpu_init(void)
static void mpic_reenable_percpu(void)
{
/* Re-enable per-CPU interrupts that were enabled before suspend */
- for (unsigned int irq = 0; irq < MPIC_MAX_PER_CPU_IRQS; irq++) {
- struct irq_data *data;
- int virq;
+ for (irq_hw_number_t i = 0; i < MPIC_MAX_PER_CPU_IRQS; i++) {
+ unsigned int virq = irq_linear_revmap(mpic_domain, i);
- virq = irq_linear_revmap(mpic_domain, irq);
- if (!virq)
- continue;
-
- data = irq_get_irq_data(virq);
-
- if (!irq_percpu_is_enabled(virq))
+ if (!virq || !irq_percpu_is_enabled(virq))
continue;
- mpic_irq_unmask(data);
+ mpic_irq_unmask(irq_get_irq_data(virq));
}
if (mpic_is_ipi_available())
Refactor the mpic_reenable_percpu() function to make it simpler. Signed-off-by: Marek Behún <kabel@kernel.org> --- drivers/irqchip/irq-armada-370-xp.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)