Skip to content

Commit ab430e7

Browse files
committed
powerpc/fsl_msi: Use msi_for_each_desc()
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 e22b0d1 commit ab430e7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

arch/powerpc/sysdev/fsl_msi.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,13 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev)
125125
struct fsl_msi *msi_data;
126126
irq_hw_number_t hwirq;
127127

128-
for_each_pci_msi_entry(entry, pdev) {
129-
if (!entry->irq)
130-
continue;
128+
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) {
131129
hwirq = virq_to_hw(entry->irq);
132130
msi_data = irq_get_chip_data(entry->irq);
133131
irq_set_msi_desc(entry->irq, NULL);
134132
irq_dispose_mapping(entry->irq);
135133
msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1);
136134
}
137-
138-
return;
139135
}
140136

141137
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)
215211
}
216212
}
217213

218-
for_each_pci_msi_entry(entry, pdev) {
214+
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_NOTASSOCIATED) {
219215
/*
220216
* Loop over all the MSI devices until we find one that has an
221217
* available interrupt.

0 commit comments

Comments
 (0)