Commit 316b5e31 authored by Rob Herring's avatar Rob Herring
Browse files

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: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211006164332.1981454-6-robh@kernel.org
parent 4d97b929
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;