Skip to content

Commit 85dabc2

Browse files
committed
powerpc/4xx/hsta: Rework MSI handling
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 2ca5e90 commit 85dabc2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/powerpc/platforms/4xx/hsta_msi.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static int hsta_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
4747
return -EINVAL;
4848
}
4949

50-
for_each_pci_msi_entry(entry, dev) {
50+
msi_for_each_desc(entry, &dev->dev, MSI_DESC_NOTASSOCIATED) {
5151
irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1);
5252
if (irq < 0) {
5353
pr_debug("%s: Failed to allocate msi interrupt\n",
@@ -105,10 +105,7 @@ static void hsta_teardown_msi_irqs(struct pci_dev *dev)
105105
struct msi_desc *entry;
106106
int irq;
107107

108-
for_each_pci_msi_entry(entry, dev) {
109-
if (!entry->irq)
110-
continue;
111-
108+
msi_for_each_desc(entry, &dev->dev, MSI_DESC_ASSOCIATED) {
112109
irq = hsta_find_hwirq_offset(entry->irq);
113110

114111
/* entry->irq should always be in irq_map */

0 commit comments

Comments
 (0)