Skip to content

Commit

Permalink
powerpc/fsl_msi: Use msi_for_each_desc()
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
KAGA-KOKO committed Dec 16, 2021
1 parent e22b0d1 commit ab430e7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/powerpc/sysdev/fsl_msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,13 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev)
struct fsl_msi *msi_data;
irq_hw_number_t hwirq;

for_each_pci_msi_entry(entry, pdev) {
if (!entry->irq)
continue;
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) {
hwirq = virq_to_hw(entry->irq);
msi_data = irq_get_chip_data(entry->irq);
irq_set_msi_desc(entry->irq, NULL);
irq_dispose_mapping(entry->irq);
msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1);
}

return;
}

static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq,
Expand Down Expand Up @@ -215,7 +211,7 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
}
}

for_each_pci_msi_entry(entry, pdev) {
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_NOTASSOCIATED) {
/*
* Loop over all the MSI devices until we find one that has an
* available interrupt.
Expand Down

0 comments on commit ab430e7

Please sign in to comment.