Skip to content

Commit 2ca5e90

Browse files
committed
s390/pci: Rework MSI descriptor walk
Replace the about to vanish iterators and make use of the filtering. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Niklas Schnelle <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: Niklas Schnelle <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3d31bbd commit 2ca5e90

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

arch/s390/pci/pci_irq.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
303303

304304
/* Request MSI interrupts */
305305
hwirq = bit;
306-
for_each_pci_msi_entry(msi, pdev) {
306+
msi_for_each_desc(msi, &pdev->dev, MSI_DESC_NOTASSOCIATED) {
307307
rc = -EIO;
308308
if (hwirq - bit >= msi_vecs)
309309
break;
@@ -362,9 +362,7 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev)
362362
return;
363363

364364
/* Release MSI interrupts */
365-
for_each_pci_msi_entry(msi, pdev) {
366-
if (!msi->irq)
367-
continue;
365+
msi_for_each_desc(msi, &pdev->dev, MSI_DESC_ASSOCIATED) {
368366
irq_set_msi_desc(msi->irq, NULL);
369367
irq_free_desc(msi->irq);
370368
msi->msg.address_lo = 0;

0 commit comments

Comments
 (0)