]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/pci: Rework MSI descriptor walk
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Dec 2021 22:51:23 +0000 (23:51 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Dec 2021 21:22:18 +0000 (22:22 +0100)
Replace the about to vanish iterators and make use of the filtering.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20211206210748.305656158@linutronix.de
arch/s390/pci/pci_irq.c

index 2beb8a082e6fa45efeaf502754497bc65858c7a5..0975ff3ba04630cba4063b8a815f9e1e3d0f5e39 100644 (file)
@@ -303,7 +303,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 
        /* Request MSI interrupts */
        hwirq = bit;
-       for_each_pci_msi_entry(msi, pdev) {
+       msi_for_each_desc(msi, &pdev->dev, MSI_DESC_NOTASSOCIATED) {
                rc = -EIO;
                if (hwirq - bit >= msi_vecs)
                        break;
@@ -362,9 +362,7 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev)
                return;
 
        /* Release MSI interrupts */
-       for_each_pci_msi_entry(msi, pdev) {
-               if (!msi->irq)
-                       continue;
+       msi_for_each_desc(msi, &pdev->dev, MSI_DESC_ASSOCIATED) {
                irq_set_msi_desc(msi->irq, NULL);
                irq_free_desc(msi->irq);
                msi->msg.address_lo = 0;