[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363217302-14383-11-git-send-email-yinghai@kernel.org>
Date: Wed, 13 Mar 2013 16:28:05 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>, Ram Pai <linuxram@...ibm.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Yinghai Lu <yinghai@...nel.org>,
Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
Yijing Wang <wangyijing@...wei.com>
Subject: [PATCH v3 10/27] PCI, pciehp: Use for_each_pci_resource() helper
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
Cc: Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
Cc: Yijing Wang <wangyijing@...wei.com>
---
drivers/pci/hotplug/pciehp_hpc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 5127f3f..2df1ae3 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -807,6 +807,7 @@ static inline void dbg_ctrl(struct controller *ctrl)
int i;
u16 reg16;
struct pci_dev *pdev = ctrl->pcie->port;
+ struct resource *res;
if (!pciehp_debug)
return;
@@ -822,11 +823,11 @@ static inline void dbg_ctrl(struct controller *ctrl)
pdev->subsystem_vendor);
ctrl_info(ctrl, " PCIe Cap offset : 0x%02x\n",
pci_pcie_cap(pdev));
- for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+ for_each_pci_resource(pdev, res, i, PCI_ALL_RES) {
if (!pci_resource_len(pdev, i))
continue;
ctrl_info(ctrl, " PCI resource [%d] : %pR\n",
- i, &pdev->resource[i]);
+ i, res);
}
ctrl_info(ctrl, "Slot Capabilities : 0x%08x\n", ctrl->slot_cap);
ctrl_info(ctrl, " Physical Slot Number : %d\n", PSN(ctrl));
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists