Skip to content

Commit 2a4849d

Browse files
robherringdlezcano
authored andcommitted
clocksource: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Daniel Lezcano <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Michal Simek <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
1 parent dc62531 commit 2a4849d

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

drivers/clocksource/asm9260_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static int __init asm9260_timer_init(struct device_node *np)
193193

194194
priv.base = of_io_request_and_map(np, 0, np->name);
195195
if (IS_ERR(priv.base)) {
196-
pr_err("%s: unable to map resource\n", np->name);
196+
pr_err("%pOFn: unable to map resource\n", np);
197197
return PTR_ERR(priv.base);
198198
}
199199

drivers/clocksource/cadence_ttc_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ static int __init ttc_timer_init(struct device_node *timer)
535535
if (ret)
536536
return ret;
537537

538-
pr_info("%s #0 at %p, irq=%d\n", timer->name, timer_baseaddr, irq);
538+
pr_info("%pOFn #0 at %p, irq=%d\n", timer, timer_baseaddr, irq);
539539

540540
return 0;
541541
}

drivers/clocksource/dw_apb_timer_of.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static void __init timer_get_base_and_rate(struct device_node *np,
3333
*base = of_iomap(np, 0);
3434

3535
if (!*base)
36-
panic("Unable to map regs for %s", np->name);
36+
panic("Unable to map regs for %pOFn", np);
3737

3838
/*
3939
* Not all implementations use a periphal clock, so don't panic
@@ -42,8 +42,8 @@ static void __init timer_get_base_and_rate(struct device_node *np,
4242
pclk = of_clk_get_by_name(np, "pclk");
4343
if (!IS_ERR(pclk))
4444
if (clk_prepare_enable(pclk))
45-
pr_warn("pclk for %s is present, but could not be activated\n",
46-
np->name);
45+
pr_warn("pclk for %pOFn is present, but could not be activated\n",
46+
np);
4747

4848
timer_clk = of_clk_get_by_name(np, "timer");
4949
if (IS_ERR(timer_clk))
@@ -57,7 +57,7 @@ static void __init timer_get_base_and_rate(struct device_node *np,
5757
try_clock_freq:
5858
if (of_property_read_u32(np, "clock-freq", rate) &&
5959
of_property_read_u32(np, "clock-frequency", rate))
60-
panic("No clock nor clock-frequency property for %s", np->name);
60+
panic("No clock nor clock-frequency property for %pOFn", np);
6161
}
6262

6363
static void __init add_clockevent(struct device_node *event_timer)

drivers/clocksource/pxa_timer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ static int __init pxa_timer_dt_init(struct device_node *np)
191191
/* timer registers are shared with watchdog timer */
192192
timer_base = of_iomap(np, 0);
193193
if (!timer_base) {
194-
pr_err("%s: unable to map resource\n", np->name);
194+
pr_err("%pOFn: unable to map resource\n", np);
195195
return -ENXIO;
196196
}
197197

198198
clk = of_clk_get(np, 0);
199199
if (IS_ERR(clk)) {
200-
pr_crit("%s: unable to get clk\n", np->name);
200+
pr_crit("%pOFn: unable to get clk\n", np);
201201
return PTR_ERR(clk);
202202
}
203203

@@ -210,7 +210,7 @@ static int __init pxa_timer_dt_init(struct device_node *np)
210210
/* we are only interested in OS-timer0 irq */
211211
irq = irq_of_parse_and_map(np, 0);
212212
if (irq <= 0) {
213-
pr_crit("%s: unable to parse OS-timer0 irq\n", np->name);
213+
pr_crit("%pOFn: unable to parse OS-timer0 irq\n", np);
214214
return -EINVAL;
215215
}
216216

drivers/clocksource/time-orion.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ static int __init orion_timer_init(struct device_node *np)
129129
/* timer registers are shared with watchdog timer */
130130
timer_base = of_iomap(np, 0);
131131
if (!timer_base) {
132-
pr_err("%s: unable to map resource\n", np->name);
132+
pr_err("%pOFn: unable to map resource\n", np);
133133
return -ENXIO;
134134
}
135135

136136
clk = of_clk_get(np, 0);
137137
if (IS_ERR(clk)) {
138-
pr_err("%s: unable to get clk\n", np->name);
138+
pr_err("%pOFn: unable to get clk\n", np);
139139
return PTR_ERR(clk);
140140
}
141141

@@ -148,7 +148,7 @@ static int __init orion_timer_init(struct device_node *np)
148148
/* we are only interested in timer1 irq */
149149
irq = irq_of_parse_and_map(np, 1);
150150
if (irq <= 0) {
151-
pr_err("%s: unable to parse timer1 irq\n", np->name);
151+
pr_err("%pOFn: unable to parse timer1 irq\n", np);
152152
return -EINVAL;
153153
}
154154

@@ -174,7 +174,7 @@ static int __init orion_timer_init(struct device_node *np)
174174
/* setup timer1 as clockevent timer */
175175
ret = setup_irq(irq, &orion_clkevt_irq);
176176
if (ret) {
177-
pr_err("%s: unable to setup irq\n", np->name);
177+
pr_err("%pOFn: unable to setup irq\n", np);
178178
return ret;
179179
}
180180

drivers/clocksource/timer-integrator-ap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
190190

191191
clk = of_clk_get(node, 0);
192192
if (IS_ERR(clk)) {
193-
pr_err("No clock for %s\n", node->name);
193+
pr_err("No clock for %pOFn\n", node);
194194
return PTR_ERR(clk);
195195
}
196196
clk_prepare_enable(clk);

drivers/clocksource/timer-sp804.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static int __init sp804_of_init(struct device_node *np)
249249
if (of_clk_get_parent_count(np) == 3) {
250250
clk2 = of_clk_get(np, 1);
251251
if (IS_ERR(clk2)) {
252-
pr_err("sp804: %s clock not found: %d\n", np->name,
252+
pr_err("sp804: %pOFn clock not found: %d\n", np,
253253
(int)PTR_ERR(clk2));
254254
clk2 = NULL;
255255
}

drivers/clocksource/zevio-timer.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,12 @@ static int __init zevio_timer_add(struct device_node *node)
148148

149149
of_address_to_resource(node, 0, &res);
150150
scnprintf(timer->clocksource_name, sizeof(timer->clocksource_name),
151-
"%llx.%s_clocksource",
152-
(unsigned long long)res.start, node->name);
151+
"%llx.%pOFn_clocksource",
152+
(unsigned long long)res.start, node);
153153

154154
scnprintf(timer->clockevent_name, sizeof(timer->clockevent_name),
155-
"%llx.%s_clockevent",
156-
(unsigned long long)res.start, node->name);
155+
"%llx.%pOFn_clockevent",
156+
(unsigned long long)res.start, node);
157157

158158
if (timer->interrupt_regs && irqnr) {
159159
timer->clkevt.name = timer->clockevent_name;

0 commit comments

Comments
 (0)