Skip to content

Commit 469869d

Browse files
robherringdlezcano
authored andcommitted
clocksource: 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> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: linux-arm-kernel@lists.infradead.org Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Acked-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent ebbe266 commit 469869d

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

drivers/clocksource/tango_xtal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ static int __init tango_clocksource_init(struct device_node *np)
2626

2727
xtal_in_cnt = of_iomap(np, 0);
2828
if (xtal_in_cnt == NULL) {
29-
pr_err("%s: invalid address\n", np->full_name);
29+
pr_err("%pOF: invalid address\n", np);
3030
return -ENXIO;
3131
}
3232

3333
clk = of_clk_get(np, 0);
3434
if (IS_ERR(clk)) {
35-
pr_err("%s: invalid clock\n", np->full_name);
35+
pr_err("%pOF: invalid clock\n", np);
3636
return PTR_ERR(clk);
3737
}
3838

@@ -43,7 +43,7 @@ static int __init tango_clocksource_init(struct device_node *np)
4343
ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350,
4444
32, clocksource_mmio_readl_up);
4545
if (ret) {
46-
pr_err("%s: registration failed\n", np->full_name);
46+
pr_err("%pOF: registration failed\n", np);
4747
return ret;
4848
}
4949

drivers/clocksource/timer-of.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static __init int timer_irq_init(struct device_node *np,
5252
of_irq->irq = irq_of_parse_and_map(np, of_irq->index);
5353
}
5454
if (!of_irq->irq) {
55-
pr_err("Failed to map interrupt for %s\n", np->full_name);
55+
pr_err("Failed to map interrupt for %pOF\n", np);
5656
return -EINVAL;
5757
}
5858

@@ -63,8 +63,7 @@ static __init int timer_irq_init(struct device_node *np,
6363
of_irq->flags ? of_irq->flags : IRQF_TIMER,
6464
np->full_name, clkevt);
6565
if (ret) {
66-
pr_err("Failed to request irq %d for %s\n", of_irq->irq,
67-
np->full_name);
66+
pr_err("Failed to request irq %d for %pOF\n", of_irq->irq, np);
6867
return ret;
6968
}
7069

@@ -88,20 +87,20 @@ static __init int timer_clk_init(struct device_node *np,
8887
of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
8988
of_clk_get(np, of_clk->index);
9089
if (IS_ERR(of_clk->clk)) {
91-
pr_err("Failed to get clock for %s\n", np->full_name);
90+
pr_err("Failed to get clock for %pOF\n", np);
9291
return PTR_ERR(of_clk->clk);
9392
}
9493

9594
ret = clk_prepare_enable(of_clk->clk);
9695
if (ret) {
97-
pr_err("Failed for enable clock for %s\n", np->full_name);
96+
pr_err("Failed for enable clock for %pOF\n", np);
9897
goto out_clk_put;
9998
}
10099

101100
of_clk->rate = clk_get_rate(of_clk->clk);
102101
if (!of_clk->rate) {
103102
ret = -EINVAL;
104-
pr_err("Failed to get clock rate for %s\n", np->full_name);
103+
pr_err("Failed to get clock rate for %pOF\n", np);
105104
goto out_clk_disable;
106105
}
107106

drivers/clocksource/timer-probe.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ void __init timer_probe(void)
4040

4141
ret = init_func_ret(np);
4242
if (ret) {
43-
pr_err("Failed to initialize '%s': %d\n",
44-
of_node_full_name(np), ret);
43+
pr_err("Failed to initialize '%pOF': %d\n", np, ret);
4544
continue;
4645
}
4746

drivers/clocksource/timer-stm32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static int __init stm32_clockevent_init(struct device_node *np)
138138
irq = irq_of_parse_and_map(np, 0);
139139
if (!irq) {
140140
ret = -EINVAL;
141-
pr_err("%s: failed to get irq.\n", np->full_name);
141+
pr_err("%pOF: failed to get irq.\n", np);
142142
goto err_get_irq;
143143
}
144144

@@ -168,12 +168,12 @@ static int __init stm32_clockevent_init(struct device_node *np)
168168
ret = request_irq(irq, stm32_clock_event_handler, IRQF_TIMER,
169169
"stm32 clockevent", data);
170170
if (ret) {
171-
pr_err("%s: failed to request irq.\n", np->full_name);
171+
pr_err("%pOF: failed to request irq.\n", np);
172172
goto err_get_irq;
173173
}
174174

175-
pr_info("%s: STM32 clockevent driver initialized (%d bits)\n",
176-
np->full_name, bits);
175+
pr_info("%pOF: STM32 clockevent driver initialized (%d bits)\n",
176+
np, bits);
177177

178178
return ret;
179179

0 commit comments

Comments
 (0)