From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>, Len Brown <lenb@kernel.org>
Cc: linux-pci@vger.kernel.org, Yinghai Lu <yinghai@kernel.org>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
linux-ia64@vger.kernel.org, linux-altix@sgi.com
Subject: [PATCH 21/29] PCI, ia64: kill pci_find_next_bus
Date: Tue, 25 Sep 2012 08:26:22 +0000 [thread overview]
Message-ID: <1348561590-28067-22-git-send-email-yinghai@kernel.org> (raw)
In-Reply-To: <1348561590-28067-1-git-send-email-yinghai@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
Cc: linux-altix@sgi.com
---
arch/ia64/hp/common/sba_iommu.c | 7 ++++---
arch/ia64/sn/kernel/io_common.c | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index bcda5b2..0f27a37 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -2155,9 +2155,10 @@ sba_init(void)
#ifdef CONFIG_PCI
{
- struct pci_bus *b = NULL;
- while ((b = pci_find_next_bus(b)) != NULL)
- sba_connect_bus(b);
+ struct pci_host_bridge *host_bridge = NULL;
+
+ for_each_pci_host_bridge(host_bridge)
+ sba_connect_bus(host_bridge->bus);
}
#endif
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 8630875..131938b 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -516,6 +516,7 @@ arch_initcall(sn_io_early_init);
int __init
sn_io_late_init(void)
{
+ struct pci_host_bridge *host_bridge = NULL;
struct pci_bus *bus;
struct pcibus_bussoft *bussoft;
cnodeid_t cnode;
@@ -530,8 +531,8 @@ sn_io_late_init(void)
* PIC, TIOCP, TIOCE (TIOCA does it during bus fixup using
* info from the PROM).
*/
- bus = NULL;
- while ((bus = pci_find_next_bus(bus)) != NULL) {
+ for_each_pci_host_bridge(host_bridge) {
+ bus = host_bridge->bus;
bussoft = SN_PCIBUS_BUSSOFT(bus);
nasid = NASID_GET(bussoft->bs_base);
cnode = nasid_to_cnodeid(nasid);
--
1.7.7
parent reply other threads:[~2012-09-25 8:26 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1348561590-28067-1-git-send-email-yinghai@kernel.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348561590-28067-22-git-send-email-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=bhelgaas@google.com \
--cc=fenghua.yu@intel.com \
--cc=lenb@kernel.org \
--cc=linux-altix@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).