linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] arm64: use for_each_node_by_type() macro
@ 2013-10-30  5:25 Wei Yongjun
  2013-10-30  5:35 ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Wei Yongjun @ 2013-10-30  5:25 UTC (permalink / raw)
  To: linux-arm-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use for_each_node_by_type() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 arch/arm64/kernel/cpu_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c
index aa0c9e7..37a4977 100644
--- a/arch/arm64/kernel/cpu_ops.c
+++ b/arch/arm64/kernel/cpu_ops.c
@@ -78,10 +78,10 @@ int __init cpu_read_ops(struct device_node *dn, int cpu)
 
 void __init cpu_read_bootcpu_ops(void)
 {
-	struct device_node *dn = NULL;
+	struct device_node *dn;
 	u64 mpidr = cpu_logical_map(0);
 
-	while ((dn = of_find_node_by_type(dn, "cpu"))) {
+	for_each_node_by_type(dn,  "cpu") {
 		u64 hwid;
 		const __be32 *prop;
 

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-30 14:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30  5:25 [PATCH -next] arm64: use for_each_node_by_type() macro Wei Yongjun
2013-10-30  5:35 ` Rob Herring
2013-10-30  5:54   ` [PATCH -next v2] " Wei Yongjun
2013-10-30 10:54     ` Catalin Marinas
2013-10-30 11:49     ` Sudeep KarkadaNagesha
2013-10-30 12:16       ` Catalin Marinas
2013-10-30 14:22         ` Sudeep KarkadaNagesha

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).