Skip to content

Commit e22b0d1

Browse files
committed
powerpc/pasemi/msi: Convert to msi_on_each_dec()
Replace the about to vanish iterators and make use of the filtering. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3c46658 commit e22b0d1

File tree

1 file changed

+2
-7
lines changed
  • arch/powerpc/platforms/pasemi

1 file changed

+2
-7
lines changed

arch/powerpc/platforms/pasemi/msi.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,12 @@ static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)
6262

6363
pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev);
6464

65-
for_each_pci_msi_entry(entry, pdev) {
66-
if (!entry->irq)
67-
continue;
68-
65+
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) {
6966
hwirq = virq_to_hw(entry->irq);
7067
irq_set_msi_desc(entry->irq, NULL);
7168
irq_dispose_mapping(entry->irq);
7269
msi_bitmap_free_hwirqs(&msi_mpic->msi_bitmap, hwirq, ALLOC_CHUNK);
7370
}
74-
75-
return;
7671
}
7772

7873
static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
@@ -90,7 +85,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
9085
msg.address_hi = 0;
9186
msg.address_lo = PASEMI_MSI_ADDR;
9287

93-
for_each_pci_msi_entry(entry, pdev) {
88+
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_NOTASSOCIATED) {
9489
/* Allocate 16 interrupts for now, since that's the grouping for
9590
* affinity. This can be changed later if it turns out 32 is too
9691
* few MSIs for someone, but restrictions will apply to how the

0 commit comments

Comments
 (0)