[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch V2 08/23] PCI/sysfs: Use pci_irq_vector()
- To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Mon, 6 Dec 2021 23:27:36 +0100 (CET)
- Cc: Bjorn Helgaas <helgaas@xxxxxxxxxx>, Marc Zygnier <maz@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxxxx>, Megha Dey <megha.dey@xxxxxxxxx>, Ashok Raj <ashok.raj@xxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, Cedric Le Goater <clg@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, Kalle Valo <kvalo@xxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, ath11k@xxxxxxxxxxxxxxxxxxx, Wei Liu <wei.liu@xxxxxxxxxx>, linux-hyperv@xxxxxxxxxxxxxxx, Christian Borntraeger <borntraeger@xxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>
- Delivery-date: Mon, 06 Dec 2021 22:27:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
instead of fiddling with msi descriptors.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Tested-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
---
drivers/pci/pci-sysfs.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -62,11 +62,8 @@ static ssize_t irq_show(struct device *d
* For MSI, show the first MSI IRQ; for all other cases including
* MSI-X, show the legacy INTx IRQ.
*/
- if (pdev->msi_enabled) {
- struct msi_desc *desc = first_pci_msi_entry(pdev);
-
- return sysfs_emit(buf, "%u\n", desc->irq);
- }
+ if (pdev->msi_enabled)
+ return sysfs_emit(buf, "%u\n", pci_irq_vector(pdev, 0));
#endif
return sysfs_emit(buf, "%u\n", pdev->irq);
|