Skip to content

Commit 36f024e

Browse files
committed
PCI/MSI: pci-xgene-msi: Consolidate chained IRQ handler install/remove
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Duc Dang <[email protected]>
1 parent f70229e commit 36f024e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/pci/host/pci-xgene-msi.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,8 @@ static int xgene_msi_remove(struct platform_device *pdev)
368368

369369
for (i = 0; i < NR_HW_IRQS; i++) {
370370
virq = msi->msi_groups[i].gic_irq;
371-
if (virq != 0) {
372-
irq_set_chained_handler(virq, NULL);
373-
irq_set_handler_data(virq, NULL);
374-
}
371+
if (virq != 0)
372+
irq_set_chained_handler_and_data(virq, NULL, NULL);
375373
}
376374
kfree(msi->msi_groups);
377375

@@ -421,8 +419,8 @@ static int xgene_msi_hwirq_alloc(unsigned int cpu)
421419
}
422420

423421
if (err) {
424-
irq_set_chained_handler(msi_group->gic_irq, NULL);
425-
irq_set_handler_data(msi_group->gic_irq, NULL);
422+
irq_set_chained_handler_and_data(msi_group->gic_irq,
423+
NULL, NULL);
426424
return err;
427425
}
428426
}
@@ -441,8 +439,8 @@ static void xgene_msi_hwirq_free(unsigned int cpu)
441439
if (!msi_group->gic_irq)
442440
continue;
443441

444-
irq_set_chained_handler(msi_group->gic_irq, NULL);
445-
irq_set_handler_data(msi_group->gic_irq, NULL);
442+
irq_set_chained_handler_and_data(msi_group->gic_irq, NULL,
443+
NULL);
446444
}
447445
}
448446

0 commit comments

Comments
 (0)