[PATCH 11/25] irqchip/armada-370-xp: Simplify ipi_resume() code
Marek Behún
kabel at kernel.org
Mon Jul 1 10:02:35 PDT 2024
Refactor the ipi_resume() function to drop one indentation level.
Signed-off-by: Marek Behún <kabel at kernel.org>
---
drivers/irqchip/irq-armada-370-xp.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index 22e1a493abae..d8b0609a9160 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -462,16 +462,13 @@ static const struct irq_domain_ops ipi_domain_ops = {
static void ipi_resume(void)
{
for (int i = 0; i < IPI_DOORBELL_END; i++) {
- int irq;
+ unsigned int virq = irq_find_mapping(ipi_domain, i);
- irq = irq_find_mapping(ipi_domain, i);
- if (irq <= 0)
+ if (!virq || !irq_percpu_is_enabled(virq))
continue;
- if (irq_percpu_is_enabled(irq)) {
- struct irq_data *d;
- d = irq_domain_get_irq_data(ipi_domain, irq);
- armada_370_xp_ipi_unmask(d);
- }
+
+ armada_370_xp_ipi_unmask(irq_domain_get_irq_data(ipi_domain,
+ virq));
}
}
--
2.44.2
More information about the linux-arm-kernel
mailing list