From: Rob Herring Date: Mon, 27 Aug 2018 14:43:40 +0000 (-0500) Subject: SH: use for_each_of_cpu_node iterator X-Git-Tag: v4.20-rc1~103^2~32^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8cabf5bc10499cbce8ed8f377b7c978717e3952c;p=thirdparty%2Fkernel%2Flinux.git SH: use for_each_of_cpu_node iterator Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Rob Herring --- diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index 26789ad281936..cde370cad4ae3 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -64,7 +64,7 @@ static void sh_of_smp_probe(void) init_cpu_possible(cpumask_of(0)); - for_each_node_by_type(np, "cpu") { + for_each_of_cpu_node(np) { const __be32 *cell = of_get_property(np, "reg", NULL); u64 id = -1; if (cell) id = of_read_number(cell, of_n_addr_cells(np));