Skip to content

Commit

Permalink
csky: Use of_get_cpu_hwid()
Browse files Browse the repository at this point in the history
Replace open coded parsing of CPU nodes 'reg' property with
of_get_cpu_hwid().

Cc: Guo Ren <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
robherring committed Oct 20, 2021
1 parent 4d97b92 commit 316b5e3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/csky/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 316b5e3

Please sign in to comment.