Commit ab430e74 authored by Thomas Gleixner's avatar Thomas Gleixner

powerpc/fsl_msi: Use msi_for_each_desc()

Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211206210748.522641685@linutronix.de
parent e22b0d1b
...@@ -125,17 +125,13 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev) ...@@ -125,17 +125,13 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev)
struct fsl_msi *msi_data; struct fsl_msi *msi_data;
irq_hw_number_t hwirq; irq_hw_number_t hwirq;
for_each_pci_msi_entry(entry, pdev) { msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) {
if (!entry->irq)
continue;
hwirq = virq_to_hw(entry->irq); hwirq = virq_to_hw(entry->irq);
msi_data = irq_get_chip_data(entry->irq); msi_data = irq_get_chip_data(entry->irq);
irq_set_msi_desc(entry->irq, NULL); irq_set_msi_desc(entry->irq, NULL);
irq_dispose_mapping(entry->irq); irq_dispose_mapping(entry->irq);
msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1); msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1);
} }
return;
} }
static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq, static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq,
...@@ -215,7 +211,7 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) ...@@ -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 * Loop over all the MSI devices until we find one that has an
* available interrupt. * available interrupt.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment