]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/cell/axon_msi: Convert to msi_on_each_desc()
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Dec 2021 22:51:26 +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>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20211206210748.414712173@linutronix.de
arch/powerpc/platforms/cell/axon_msi.c

index ac59aee7e884861a3e9bc22681f019cf8d30eb55..354a58c1e6f2dfaa9ed9c5856b4e11b796ca515a 100644 (file)
@@ -262,7 +262,7 @@ static int axon_msi_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
        if (rc)
                return rc;
 
-       for_each_pci_msi_entry(entry, dev) {
+       msi_for_each_desc(entry, &dev->dev, MSI_DESC_NOTASSOCIATED) {
                virq = irq_create_direct_mapping(msic->irq_domain);
                if (!virq) {
                        dev_warn(&dev->dev,
@@ -285,10 +285,7 @@ static void axon_msi_teardown_msi_irqs(struct pci_dev *dev)
 
        dev_dbg(&dev->dev, "axon_msi: tearing down msi irqs\n");
 
-       for_each_pci_msi_entry(entry, dev) {
-               if (!entry->irq)
-                       continue;
-
+       msi_for_each_desc(entry, &dev->dev, MSI_DESC_ASSOCIATED) {
                irq_set_msi_desc(entry->irq, NULL);
                irq_dispose_mapping(entry->irq);
        }