[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200728022817.87957-1-miaoqinglang@huawei.com>
Date: Tue, 28 Jul 2020 10:28:17 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: "David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <sparclinux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] sparc: use for_each_child_of_node() macro
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
arch/sparc/kernel/pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 5d45b6d76..9c2b720bf 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -552,9 +552,8 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
pci_info(bus, "scan_bus[%pOF] bus no %d\n",
node, bus->number);
- child = NULL;
prev_devfn = -1;
- while ((child = of_get_next_child(node, child)) != NULL) {
+ for_each_child_of_node(node, child) {
if (ofpci_verbose)
pci_info(bus, " * %pOF\n", child);
reg = of_get_property(child, "reg", ®len);
--
2.25.1
Powered by blists - more mailing lists