Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbbGVUjo (ORCPT ); Wed, 22 Jul 2015 16:39:44 -0400 Received: from terminus.zytor.com ([198.137.202.10]:59288 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbbGVUjk (ORCPT ); Wed, 22 Jul 2015 16:39:40 -0400 Date: Wed, 22 Jul 2015 13:38:57 -0700 From: tip-bot for Jiang Liu Message-ID: Cc: marc.zyngier@arm.com, tglx@linutronix.de, konrad.wilk@oracle.com, wangyijing@huawei.com, bhelgaas@google.com, linux-kernel@vger.kernel.org, jiang.liu@linux.intel.com, tony.luck@intel.com, bp@alien8.de, hpa@zytor.com, stuart.yoder@freescale.com, grant.likely@linaro.org, mingo@kernel.org Reply-To: jiang.liu@linux.intel.com, hpa@zytor.com, tony.luck@intel.com, bp@alien8.de, stuart.yoder@freescale.com, mingo@kernel.org, grant.likely@linaro.org, marc.zyngier@arm.com, tglx@linutronix.de, wangyijing@huawei.com, konrad.wilk@oracle.com, bhelgaas@google.com, linux-kernel@vger.kernel.org In-Reply-To: <1436428847-8886-6-git-send-email-jiang.liu@linux.intel.com> References: <1436428847-8886-6-git-send-email-jiang.liu@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] x86/PCI: Use for_pci_msi_entry() to access MSI device list Git-Commit-ID: 39118e31e1daae43048f5deaa3e0894d2732a7d6 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2946 Lines: 75 Commit-ID: 39118e31e1daae43048f5deaa3e0894d2732a7d6 Gitweb: http://git.kernel.org/tip/39118e31e1daae43048f5deaa3e0894d2732a7d6 Author: Jiang Liu AuthorDate: Thu, 9 Jul 2015 16:00:40 +0800 Committer: Thomas Gleixner CommitDate: Wed, 22 Jul 2015 18:37:43 +0200 x86/PCI: Use for_pci_msi_entry() to access MSI device list Use accessor for_each_pci_msi_entry() to access MSI device list, so we could easily move msi_list from struct pci_dev into struct device later. Signed-off-by: Jiang Liu Acked-by: Konrad Rzeszutek Wilk Cc: Tony Luck Cc: linux-arm-kernel@lists.infradead.org Cc: xen-devel@lists.xenproject.org Cc: Bjorn Helgaas Cc: Grant Likely Cc: Marc Zyngier Cc: Stuart Yoder Cc: Yijing Wang Cc: Borislav Petkov Link: http://lkml.kernel.org/r/1436428847-8886-6-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- arch/x86/pci/xen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index d22f4b5..ff31ab4 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -179,7 +179,7 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) if (ret) goto error; i = 0; - list_for_each_entry(msidesc, &dev->msi_list, list) { + for_each_pci_msi_entry(msidesc, dev) { irq = xen_bind_pirq_msi_to_irq(dev, msidesc, v[i], (type == PCI_CAP_ID_MSI) ? nvec : 1, (type == PCI_CAP_ID_MSIX) ? @@ -230,7 +230,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) if (type == PCI_CAP_ID_MSI && nvec > 1) return 1; - list_for_each_entry(msidesc, &dev->msi_list, list) { + for_each_pci_msi_entry(msidesc, dev) { __pci_read_msi_msg(msidesc, &msg); pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | ((msg.address_lo >> MSI_ADDR_DEST_ID_SHIFT) & 0xff); @@ -274,7 +274,7 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) int ret = 0; struct msi_desc *msidesc; - list_for_each_entry(msidesc, &dev->msi_list, list) { + for_each_pci_msi_entry(msidesc, dev) { struct physdev_map_pirq map_irq; domid_t domid; @@ -386,7 +386,7 @@ static void xen_teardown_msi_irqs(struct pci_dev *dev) { struct msi_desc *msidesc; - msidesc = list_entry(dev->msi_list.next, struct msi_desc, list); + msidesc = first_pci_msi_entry(dev); if (msidesc->msi_attrib.is_msix) xen_pci_frontend_disable_msix(dev); else -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/