Skip to content

Commit 3ca5768

Browse files
mpredfearndlezcano
authored andcommitted
clocksource/drivers/mips-gic-timer: Add pr_fmt and reword pr_* messages
Several messages from the MIPS GIC driver include the text "GIC", "GIC timer", etc, but the format is not standard. Add a pr_fmt of "mips-gic-timer: " and reword the messages now that they will be prefixed with the driver name. Signed-off-by: Matt Redfearn <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 8a1ece2 commit 3ca5768

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

drivers/clocksource/mips-gic-timer.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*
66
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
77
*/
8+
9+
#define pr_fmt(fmt) "mips-gic-timer: " fmt
10+
811
#include <linux/clk.h>
912
#include <linux/clockchips.h>
1013
#include <linux/cpu.h>
@@ -136,8 +139,7 @@ static int gic_clockevent_init(void)
136139

137140
ret = setup_percpu_irq(gic_timer_irq, &gic_compare_irqaction);
138141
if (ret < 0) {
139-
pr_err("GIC timer IRQ %d setup failed: %d\n",
140-
gic_timer_irq, ret);
142+
pr_err("IRQ %d setup failed (%d)\n", gic_timer_irq, ret);
141143
return ret;
142144
}
143145

@@ -176,7 +178,7 @@ static int __init __gic_clocksource_init(void)
176178

177179
ret = clocksource_register_hz(&gic_clocksource, gic_frequency);
178180
if (ret < 0)
179-
pr_warn("GIC: Unable to register clocksource\n");
181+
pr_warn("Unable to register clocksource\n");
180182

181183
return ret;
182184
}
@@ -188,28 +190,28 @@ static int __init gic_clocksource_of_init(struct device_node *node)
188190

189191
if (!mips_gic_present() || !node->parent ||
190192
!of_device_is_compatible(node->parent, "mti,gic")) {
191-
pr_warn("No DT definition for the mips gic driver\n");
193+
pr_warn("No DT definition\n");
192194
return -ENXIO;
193195
}
194196

195197
clk = of_clk_get(node, 0);
196198
if (!IS_ERR(clk)) {
197199
ret = clk_prepare_enable(clk);
198200
if (ret < 0) {
199-
pr_err("GIC failed to enable clock\n");
201+
pr_err("Failed to enable clock\n");
200202
clk_put(clk);
201203
return ret;
202204
}
203205

204206
gic_frequency = clk_get_rate(clk);
205207
} else if (of_property_read_u32(node, "clock-frequency",
206208
&gic_frequency)) {
207-
pr_err("GIC frequency not specified.\n");
209+
pr_err("Frequency not specified\n");
208210
return -EINVAL;
209211
}
210212
gic_timer_irq = irq_of_parse_and_map(node, 0);
211213
if (!gic_timer_irq) {
212-
pr_err("GIC timer IRQ not specified.\n");
214+
pr_err("IRQ not specified\n");
213215
return -EINVAL;
214216
}
215217

@@ -220,7 +222,7 @@ static int __init gic_clocksource_of_init(struct device_node *node)
220222
ret = gic_clockevent_init();
221223
if (!ret && !IS_ERR(clk)) {
222224
if (clk_notifier_register(clk, &gic_clk_nb) < 0)
223-
pr_warn("GIC: Unable to register clock notifier\n");
225+
pr_warn("Unable to register clock notifier\n");
224226
}
225227

226228
/* And finally start the counter */

0 commit comments

Comments
 (0)