aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-05-25 14:49:55 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-06-10 05:31:14 -0400
commit45bbfe64ea564a69e56ab6754006eee506224f46 (patch)
tree63981e2239f46f0f3909fb6c3d493b24cbfae0c6
parentc569a23d65ac2900d9998d3fe04044fe95be6b2f (diff)
clocksource: Use current logging style
clocksource messages aren't prefixed in dmesg so it's a bit unclear what subsystem emits the messages. Use pr_fmt and pr_<level> to auto-prefix the messages appropriately. Miscellanea: o Remove "Warning" from KERN_WARNING level messages o Align "timekeeping watchdog: " messages o Coalesce formats o Align multiline arguments Signed-off-by: Joe Perches <joe@perches.com> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/1432579795.2846.75.camel@perches.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/time/clocksource.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 15facb1b9c60..841b72f720e8 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -23,6 +23,8 @@
23 * o Allow clocksource drivers to be unregistered 23 * o Allow clocksource drivers to be unregistered
24 */ 24 */
25 25
26#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
27
26#include <linux/device.h> 28#include <linux/device.h>
27#include <linux/clocksource.h> 29#include <linux/clocksource.h>
28#include <linux/init.h> 30#include <linux/init.h>
@@ -216,10 +218,11 @@ static void clocksource_watchdog(unsigned long data)
216 218
217 /* Check the deviation from the watchdog clocksource. */ 219 /* Check the deviation from the watchdog clocksource. */
218 if ((abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD)) { 220 if ((abs(cs_nsec - wd_nsec) > WATCHDOG_THRESHOLD)) {
219 pr_warn("timekeeping watchdog: Marking clocksource '%s' as unstable, because the skew is too large:\n", cs->name); 221 pr_warn("timekeeping watchdog: Marking clocksource '%s' as unstable because the skew is too large:\n",
220 pr_warn(" '%s' wd_now: %llx wd_last: %llx mask: %llx\n", 222 cs->name);
223 pr_warn(" '%s' wd_now: %llx wd_last: %llx mask: %llx\n",
221 watchdog->name, wdnow, wdlast, watchdog->mask); 224 watchdog->name, wdnow, wdlast, watchdog->mask);
222 pr_warn(" '%s' cs_now: %llx cs_last: %llx mask: %llx\n", 225 pr_warn(" '%s' cs_now: %llx cs_last: %llx mask: %llx\n",
223 cs->name, csnow, cslast, cs->mask); 226 cs->name, csnow, cslast, cs->mask);
224 __clocksource_unstable(cs); 227 __clocksource_unstable(cs);
225 continue; 228 continue;
@@ -567,9 +570,8 @@ static void __clocksource_select(bool skipcur)
567 */ 570 */
568 if (!(cs->flags & CLOCK_SOURCE_VALID_FOR_HRES) && oneshot) { 571 if (!(cs->flags & CLOCK_SOURCE_VALID_FOR_HRES) && oneshot) {
569 /* Override clocksource cannot be used. */ 572 /* Override clocksource cannot be used. */
570 printk(KERN_WARNING "Override clocksource %s is not " 573 pr_warn("Override clocksource %s is not HRT compatible - cannot switch while in HRT/NOHZ mode\n",
571 "HRT compatible. Cannot switch while in " 574 cs->name);
572 "HRT/NOHZ mode\n", cs->name);
573 override_name[0] = 0; 575 override_name[0] = 0;
574 } else 576 } else
575 /* Override clocksource can be used. */ 577 /* Override clocksource can be used. */
@@ -708,8 +710,8 @@ void __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq
708 710
709 clocksource_update_max_deferment(cs); 711 clocksource_update_max_deferment(cs);
710 712
711 pr_info("clocksource %s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n", 713 pr_info("%s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n",
712 cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns); 714 cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns);
713} 715}
714EXPORT_SYMBOL_GPL(__clocksource_update_freq_scale); 716EXPORT_SYMBOL_GPL(__clocksource_update_freq_scale);
715 717
@@ -1008,12 +1010,10 @@ __setup("clocksource=", boot_override_clocksource);
1008static int __init boot_override_clock(char* str) 1010static int __init boot_override_clock(char* str)
1009{ 1011{
1010 if (!strcmp(str, "pmtmr")) { 1012 if (!strcmp(str, "pmtmr")) {
1011 printk("Warning: clock=pmtmr is deprecated. " 1013 pr_warn("clock=pmtmr is deprecated - use clocksource=acpi_pm\n");
1012 "Use clocksource=acpi_pm.\n");
1013 return boot_override_clocksource("acpi_pm"); 1014 return boot_override_clocksource("acpi_pm");
1014 } 1015 }
1015 printk("Warning! clock= boot option is deprecated. " 1016 pr_warn("clock= boot option is deprecated - use clocksource=xyz\n");
1016 "Use clocksource=xyz\n");
1017 return boot_override_clocksource(str); 1017 return boot_override_clocksource(str);
1018} 1018}
1019 1019