Skip to content

Commit a8e65e0

Browse files
robherringarndb
authored andcommitted
ARM: 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 <robh@kernel.org> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Shawn Guo <shawnguo@kernel.org> Acked-by: Simon Horman <horms+renesas@verge.net.au> Cc: Russell King <linux@armlinux.org.uk> Cc: Kukjin Kim <kgene@kernel.org> Cc: Javier Martinez Canillas <javier@osg.samsung.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Cc: Tony Lindgren <tony@atomide.com> Cc: "Benoît Cousson" <bcousson@baylibre.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent bbc7c1d commit a8e65e0

10 files changed

Lines changed: 20 additions & 25 deletions

File tree

‎arch/arm/kernel/cpuidle.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ static int __init arm_cpuidle_read_ops(struct device_node *dn, int cpu)
101101

102102
ops = arm_cpuidle_get_ops(enable_method);
103103
if (!ops) {
104-
pr_warn("%s: unsupported enable-method property: %s\n",
105-
dn->full_name, enable_method);
104+
pr_warn("%pOF: unsupported enable-method property: %s\n",
105+
dn, enable_method);
106106
return -EOPNOTSUPP;
107107
}
108108

‎arch/arm/kernel/devtree.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,15 @@ void __init arm_dt_init_cpu_maps(void)
9595
if (of_node_cmp(cpu->type, "cpu"))
9696
continue;
9797

98-
pr_debug(" * %s...\n", cpu->full_name);
98+
pr_debug(" * %pOF...\n", cpu);
9999
/*
100100
* A device tree containing CPU nodes with missing "reg"
101101
* properties is considered invalid to build the
102102
* cpu_logical_map.
103103
*/
104104
cell = of_get_property(cpu, "reg", &prop_bytes);
105105
if (!cell || prop_bytes < sizeof(*cell)) {
106-
pr_debug(" * %s missing reg property\n",
107-
cpu->full_name);
106+
pr_debug(" * %pOF missing reg property\n", cpu);
108107
of_node_put(cpu);
109108
return;
110109
}

‎arch/arm/kernel/topology.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ static void __init parse_dt_topology(void)
127127

128128
rate = of_get_property(cn, "clock-frequency", &len);
129129
if (!rate || len != 4) {
130-
pr_err("%s missing clock-frequency property\n",
131-
cn->full_name);
130+
pr_err("%pOF missing clock-frequency property\n", cn);
132131
continue;
133132
}
134133

‎arch/arm/mach-exynos/suspend.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,20 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
187187
struct irq_domain *parent_domain, *domain;
188188

189189
if (!parent) {
190-
pr_err("%s: no parent, giving up\n", node->full_name);
190+
pr_err("%pOF: no parent, giving up\n", node);
191191
return -ENODEV;
192192
}
193193

194194
parent_domain = irq_find_host(parent);
195195
if (!parent_domain) {
196-
pr_err("%s: unable to obtain parent domain\n", node->full_name);
196+
pr_err("%pOF: unable to obtain parent domain\n", node);
197197
return -ENXIO;
198198
}
199199

200200
pmu_base_addr = of_iomap(node, 0);
201201

202202
if (!pmu_base_addr) {
203-
pr_err("%s: failed to find exynos pmu register\n",
204-
node->full_name);
203+
pr_err("%pOF: failed to find exynos pmu register\n", node);
205204
return -ENOMEM;
206205
}
207206

‎arch/arm/mach-imx/gpc.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,13 @@ static int __init imx_gpc_init(struct device_node *node,
224224
int i;
225225

226226
if (!parent) {
227-
pr_err("%s: no parent, giving up\n", node->full_name);
227+
pr_err("%pOF: no parent, giving up\n", node);
228228
return -ENODEV;
229229
}
230230

231231
parent_domain = irq_find_host(parent);
232232
if (!parent_domain) {
233-
pr_err("%s: unable to obtain parent domain\n", node->full_name);
233+
pr_err("%pOF: unable to obtain parent domain\n", node);
234234
return -ENXIO;
235235
}
236236

‎arch/arm/mach-mvebu/kirkwood.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ static void __init kirkwood_dt_eth_fixup(void)
107107
clk_prepare_enable(clk);
108108

109109
/* store MAC address register contents in local-mac-address */
110-
pr_err(FW_INFO "%s: local-mac-address is not set\n",
111-
np->full_name);
110+
pr_err(FW_INFO "%pOF: local-mac-address is not set\n", np);
112111

113112
pmac = kzalloc(sizeof(*pmac) + 6, GFP_KERNEL);
114113
if (!pmac)

‎arch/arm/mach-omap2/omap-wakeupgen.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,13 +522,13 @@ static int __init wakeupgen_init(struct device_node *node,
522522
u32 val;
523523

524524
if (!parent) {
525-
pr_err("%s: no parent, giving up\n", node->full_name);
525+
pr_err("%pOF: no parent, giving up\n", node);
526526
return -ENODEV;
527527
}
528528

529529
parent_domain = irq_find_host(parent);
530530
if (!parent_domain) {
531-
pr_err("%s: unable to obtain parent domain\n", node->full_name);
531+
pr_err("%pOF: unable to obtain parent domain\n", node);
532532
return -ENXIO;
533533
}
534534
/* Not supported on OMAP4 ES1.0 silicon */

‎arch/arm/mach-omap2/omap_hwmod.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,8 +2417,8 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
24172417
if (mem)
24182418
pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name);
24192419
else
2420-
pr_err("omap_hwmod: %s: Missing dt reg%i for %s\n",
2421-
oh->name, index, np->full_name);
2420+
pr_err("omap_hwmod: %s: Missing dt reg%i for %pOF\n",
2421+
oh->name, index, np);
24222422
return -ENXIO;
24232423
}
24242424

‎arch/arm/mach-rockchip/platsmp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
182182

183183
ret = of_address_to_resource(node, 0, &res);
184184
if (ret < 0) {
185-
pr_err("%s: could not get address for node %s\n",
186-
__func__, node->full_name);
185+
pr_err("%s: could not get address for node %pOF\n",
186+
__func__, node);
187187
return ret;
188188
}
189189

‎arch/arm/mach-shmobile/pm-rmobile.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
195195
return;
196196
}
197197

198-
pr_debug("Special PM domain %s type %d for %s\n", pd->name, type,
199-
np->full_name);
198+
pr_debug("Special PM domain %s type %d for %pOF\n", pd->name, type, np);
200199

201200
special_pds[num_special_pds].pd = pd;
202201
special_pds[num_special_pds].type = type;
@@ -331,13 +330,13 @@ static int __init rmobile_init_pm_domains(void)
331330
for_each_compatible_node(np, NULL, "renesas,sysc-rmobile") {
332331
base = of_iomap(np, 0);
333332
if (!base) {
334-
pr_warn("%s cannot map reg 0\n", np->full_name);
333+
pr_warn("%pOF cannot map reg 0\n", np);
335334
continue;
336335
}
337336

338337
pmd = of_get_child_by_name(np, "pm-domains");
339338
if (!pmd) {
340-
pr_warn("%s lacks pm-domains node\n", np->full_name);
339+
pr_warn("%pOF lacks pm-domains node\n", np);
341340
continue;
342341
}
343342

0 commit comments

Comments
 (0)