summaryrefslogtreecommitdiff
path: root/arch/csky
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2021-10-06 11:43:25 -0500
committerRob Herring <robh@kernel.org>2021-10-20 13:37:24 -0500
commit316b5e31daef5ae757e7293b638f297da708dc3e (patch)
tree9a7f049f1367cc40b34c53d3174e87ae232b4afc /arch/csky
parent4d97b9290ed33db59620e287c3aa1ce36ba593aa (diff)
csky: Use of_get_cpu_hwid()
Replace open coded parsing of CPU nodes 'reg' property with of_get_cpu_hwid(). Cc: Guo Ren <guoren@kernel.org> Cc: linux-csky@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211006164332.1981454-6-robh@kernel.org
Diffstat (limited to 'arch/csky')
-rw-r--r--arch/csky/kernel/smp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c
index e2993539af8e..6bb38bc2f39b 100644
--- a/arch/csky/kernel/smp.c
+++ b/arch/csky/kernel/smp.c
@@ -180,15 +180,13 @@ void __init setup_smp_ipi(void)
void __init setup_smp(void)
{
struct device_node *node = NULL;
- int cpu;
+ unsigned int cpu;
for_each_of_cpu_node(node) {
if (!of_device_is_available(node))
continue;
- if (of_property_read_u32(node, "reg", &cpu))
- continue;
-
+ cpu = of_get_cpu_hwid(node, 0);
if (cpu >= NR_CPUS)
continue;