Skip to content

Commit a270f32

Browse files
robherringwildea01
authored andcommitted
arm64: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 6f44a0b commit a270f32

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

arch/arm64/kernel/cpu_ops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ static const char *__init cpu_read_enable_method(int cpu)
8282
* Don't warn spuriously.
8383
*/
8484
if (cpu != 0)
85-
pr_err("%s: missing enable-method property\n",
86-
dn->full_name);
85+
pr_err("%pOF: missing enable-method property\n",
86+
dn);
8787
}
8888
} else {
8989
enable_method = acpi_get_enable_method(cpu);

arch/arm64/kernel/smp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ static u64 __init of_get_cpu_mpidr(struct device_node *dn)
469469
*/
470470
cell = of_get_property(dn, "reg", NULL);
471471
if (!cell) {
472-
pr_err("%s: missing reg property\n", dn->full_name);
472+
pr_err("%pOF: missing reg property\n", dn);
473473
return INVALID_HWID;
474474
}
475475

@@ -478,7 +478,7 @@ static u64 __init of_get_cpu_mpidr(struct device_node *dn)
478478
* Non affinity bits must be set to 0 in the DT
479479
*/
480480
if (hwid & ~MPIDR_HWID_BITMASK) {
481-
pr_err("%s: invalid reg property\n", dn->full_name);
481+
pr_err("%pOF: invalid reg property\n", dn);
482482
return INVALID_HWID;
483483
}
484484
return hwid;
@@ -627,8 +627,8 @@ static void __init of_parse_and_init_cpus(void)
627627
goto next;
628628

629629
if (is_mpidr_duplicate(cpu_count, hwid)) {
630-
pr_err("%s: duplicate cpu reg properties in the DT\n",
631-
dn->full_name);
630+
pr_err("%pOF: duplicate cpu reg properties in the DT\n",
631+
dn);
632632
goto next;
633633
}
634634

@@ -640,8 +640,8 @@ static void __init of_parse_and_init_cpus(void)
640640
*/
641641
if (hwid == cpu_logical_map(0)) {
642642
if (bootcpu_valid) {
643-
pr_err("%s: duplicate boot cpu reg property in DT\n",
644-
dn->full_name);
643+
pr_err("%pOF: duplicate boot cpu reg property in DT\n",
644+
dn);
645645
goto next;
646646
}
647647

arch/arm64/kernel/topology.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static int __init get_cpu_for_node(struct device_node *node)
4545
}
4646
}
4747

48-
pr_crit("Unable to find CPU node for %s\n", cpu_node->full_name);
48+
pr_crit("Unable to find CPU node for %pOF\n", cpu_node);
4949

5050
of_node_put(cpu_node);
5151
return -1;
@@ -71,8 +71,8 @@ static int __init parse_core(struct device_node *core, int cluster_id,
7171
cpu_topology[cpu].core_id = core_id;
7272
cpu_topology[cpu].thread_id = i;
7373
} else {
74-
pr_err("%s: Can't get CPU for thread\n",
75-
t->full_name);
74+
pr_err("%pOF: Can't get CPU for thread\n",
75+
t);
7676
of_node_put(t);
7777
return -EINVAL;
7878
}
@@ -84,15 +84,15 @@ static int __init parse_core(struct device_node *core, int cluster_id,
8484
cpu = get_cpu_for_node(core);
8585
if (cpu >= 0) {
8686
if (!leaf) {
87-
pr_err("%s: Core has both threads and CPU\n",
88-
core->full_name);
87+
pr_err("%pOF: Core has both threads and CPU\n",
88+
core);
8989
return -EINVAL;
9090
}
9191

9292
cpu_topology[cpu].cluster_id = cluster_id;
9393
cpu_topology[cpu].core_id = core_id;
9494
} else if (leaf) {
95-
pr_err("%s: Can't get CPU for leaf core\n", core->full_name);
95+
pr_err("%pOF: Can't get CPU for leaf core\n", core);
9696
return -EINVAL;
9797
}
9898

@@ -137,17 +137,17 @@ static int __init parse_cluster(struct device_node *cluster, int depth)
137137
has_cores = true;
138138

139139
if (depth == 0) {
140-
pr_err("%s: cpu-map children should be clusters\n",
141-
c->full_name);
140+
pr_err("%pOF: cpu-map children should be clusters\n",
141+
c);
142142
of_node_put(c);
143143
return -EINVAL;
144144
}
145145

146146
if (leaf) {
147147
ret = parse_core(c, cluster_id, core_id++);
148148
} else {
149-
pr_err("%s: Non-leaf cluster with core %s\n",
150-
cluster->full_name, name);
149+
pr_err("%pOF: Non-leaf cluster with core %s\n",
150+
cluster, name);
151151
ret = -EINVAL;
152152
}
153153

@@ -159,7 +159,7 @@ static int __init parse_cluster(struct device_node *cluster, int depth)
159159
} while (c);
160160

161161
if (leaf && !has_cores)
162-
pr_warn("%s: empty cluster\n", cluster->full_name);
162+
pr_warn("%pOF: empty cluster\n", cluster);
163163

164164
if (leaf)
165165
cluster_id++;

0 commit comments

Comments
 (0)