From: Rob Herring Date: Wed, 6 Oct 2021 16:43:25 +0000 (-0500) Subject: csky: Use of_get_cpu_hwid() X-Git-Tag: v5.16-rc1~135^2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=316b5e31daef5ae757e7293b638f297da708dc3e;p=thirdparty%2Flinux.git csky: Use of_get_cpu_hwid() Replace open coded parsing of CPU nodes 'reg' property with of_get_cpu_hwid(). Cc: Guo Ren Cc: linux-csky@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20211006164332.1981454-6-robh@kernel.org --- diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c index e2993539af8ef..6bb38bc2f39b4 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;