projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd2259e
)
sh: Use of_get_cpu_hwid()
author
Rob Herring
<robh@kernel.org>
Wed, 6 Oct 2021 16:43:29 +0000
(11:43 -0500)
committer
Rob Herring
<robh@kernel.org>
Wed, 20 Oct 2021 18:37:24 +0000
(13:37 -0500)
Replace open coded parsing of CPU nodes' 'reg' property with
of_get_cpu_hwid().
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Link:
https://lore.kernel.org/r/20211006164332.1981454-10-robh@kernel.org
arch/sh/boards/of-generic.c
patch
|
blob
|
history
diff --git
a/arch/sh/boards/of-generic.c
b/arch/sh/boards/of-generic.c
index
921d76f
..
f7f3e61
100644
(file)
--- a/
arch/sh/boards/of-generic.c
+++ b/
arch/sh/boards/of-generic.c
@@
-62,9
+62,8
@@
static void sh_of_smp_probe(void)
init_cpu_possible(cpumask_of(0));
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));
+ u64 id = of_get_cpu_hwid(np, 0);
+
if (id < NR_CPUS) {
if (!method)
of_property_read_string(np, "enable-method", &method);