summaryrefslogtreecommitdiff
path: root/arch/s390/pci
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-07 01:51:23 +0300
committerThomas Gleixner <tglx@linutronix.de>2021-12-17 00:22:18 +0300
commit2ca5e908d0f4cde61d9d3595e8314adca5d914a1 (patch)
treed5de6d752cf041332152c713bdf472c5de426a3a /arch/s390/pci
parent3d31bbd39aa5c7467a34e8202a983e81b696a883 (diff)
downloadlinux-2ca5e908d0f4cde61d9d3595e8314adca5d914a1.tar.xz
s390/pci: Rework MSI descriptor walk
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
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci_irq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
index 2beb8a082e6f..0975ff3ba046 100644
--- a/arch/s390/pci/pci_irq.c
+++ b/arch/s390/pci/pci_irq.c
@@ -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;