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
This commit is contained in:
Rob Herring 2021-10-06 11:43:25 -05:00
parent 4d97b9290e
commit 316b5e31da

View File

@ -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;