From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: [PATCH 5/6] PCI/pcmcia: Use list_for_each_entry() for bus traversal Date: Thu, 13 Feb 2014 21:14:02 +0800 Message-ID: <1392297243-61848-5-git-send-email-wangyijing@huawei.com> References: <1392297243-61848-1-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1392297243-61848-1-git-send-email-wangyijing@huawei.com> Sender: linux-pci-owner@vger.kernel.org To: Bjorn Helgaas Cc: Russell King , David Airlie , dri-devel@lists.freedesktop.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-pcmcia@lists.infradead.org, linux-pci@vger.kernel.org, Yijing Wang , Hanjun Guo List-Id: dri-devel@lists.freedesktop.org Replace list_for_each() + pci_bus_b() with the simpler list_for_each_entry(). Signed-off-by: Yijing Wang --- drivers/pcmcia/yenta_socket.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 8485761..d16fb12 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c @@ -1076,7 +1076,7 @@ static void yenta_config_init(struct yenta_socket *socket) */ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) { - struct list_head *tmp; + struct pci_bus *silbling; unsigned char upper_limit; /* * We only check and fix the parent bridge: All systems which need @@ -1096,8 +1096,8 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) upper_limit = bridge_to_fix->parent->busn_res.end; /* check the bus ranges of all silbling bridges to prevent overlap */ - list_for_each(tmp, &bridge_to_fix->parent->children) { - struct pci_bus *silbling = pci_bus_b(tmp); + list_for_each_entry(silbling, &bridge_to_fix->parent->children, + node) { /* * If the silbling has a higher secondary bus number * and it's secondary is equal or smaller than our -- 1.7.1