Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6273C433F5 for ; Thu, 9 Dec 2021 16:07:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241062AbhLIQLQ (ORCPT ); Thu, 9 Dec 2021 11:11:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240808AbhLIQKo (ORCPT ); Thu, 9 Dec 2021 11:10:44 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A59C0617A1; Thu, 9 Dec 2021 08:07:10 -0800 (PST) Date: Thu, 09 Dec 2021 16:07:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639066029; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUz5pIv+0D83MgGXGMwLNebQu0KZZRAiksB0n9xqhIE=; b=iKvYZp0zxSpLIULwLALh71lj85Pq/c9PrduARj+Dq8lOaKFB/lxxbIEJUREcvjPxsYsBuu xUA8wcyGrdESR+E/IbXGqXRfUjgq9l8Gsq3lJEZZiDPH3oefHu4pb9lW/DGz6L33Epe2c2 mFJ23sB/XhqZl9MVqjtzxz0u3j//OiV0G/VSCo06toWtbY/5d7pEgXy9xn9pr/fc3dz5hF uWk6SgCe5OOkFdpGdIimfo87xUi3AoiynZtggE5Ewobzb1dz90X/P1+R1WCa7wZx3Pl+g1 T8cuLooylbihEnmydH9HlvzB+T3sgdVe4miZBnM73w1JZQLP14ISDwpVC2vcGw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639066029; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUz5pIv+0D83MgGXGMwLNebQu0KZZRAiksB0n9xqhIE=; b=dxvysYbQ5h83uhBthpPw3TWLfDVKMJZQjsBmqYeb33ZU1IpPFOG/npLDlswjrH3lpzqPet cgQ5y8pH4nKlrQBA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/msi] PCI/sysfs: Use pci_irq_vector() Cc: Thomas Gleixner , Juergen Gross , Jason Gunthorpe , "Greg Kroah-Hartman" , Bjorn Helgaas , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20211206210224.265589103@linutronix.de> References: <20211206210224.265589103@linutronix.de> MIME-Version: 1.0 Message-ID: <163906602849.11128.5747033327682594759.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/msi branch of tip: Commit-ID: 793c5006769d77b8148236bc124b75e391110531 Gitweb: https://git.kernel.org/tip/793c5006769d77b8148236bc124b75e391110531 Author: Thomas Gleixner AuthorDate: Mon, 06 Dec 2021 23:27:36 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 09 Dec 2021 11:52:21 +01:00 PCI/sysfs: Use pci_irq_vector() instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Reviewed-by: Jason Gunthorpe Reviewed-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20211206210224.265589103@linutronix.de --- drivers/pci/pci-sysfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index cfe2f85..602f0fb 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -62,11 +62,8 @@ static ssize_t irq_show(struct device *dev, * 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);