lkml.org 
[lkml]   [2021]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[patch V2 08/23] PCI/sysfs: Use pci_irq_vector()
    Date
    instead of fiddling with msi descriptors.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Tested-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
    ---
    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);
    \
     
     \ /
      Last update: 2021-12-06 23:28    [W:4.063 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site