[PATCH 1/3] kernel/hrtimer.c: convert printk to pr_foo()
From: Fabian Frederick
Date: Fri May 16 2014 - 12:03:26 EST
...and define pr_fmt
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
kernel/hrtimer.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 6b715c0..14f9030 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -31,6 +31,8 @@
* For licencing details see kernel-base/COPYING
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/cpu.h>
#include <linux/export.h>
#include <linux/percpu.h>
@@ -717,8 +719,8 @@ static int hrtimer_switch_to_hres(void)
if (tick_init_highres()) {
local_irq_restore(flags);
- printk(KERN_WARNING "Could not switch to high resolution "
- "mode on CPU %d\n", cpu);
+ pr_warn("Could not switch to high resolution mode on CPU %d\n",
+ cpu);
return 0;
}
base->hres_active = 1;
@@ -1410,8 +1412,7 @@ retry:
else
expires_next = ktime_add(now, delta);
tick_program_event(expires_next, 1);
- printk_once(KERN_WARNING "hrtimer: interrupt took %llu ns\n",
- ktime_to_ns(delta));
+ pr_warn_once("interrupt took %llu ns\n", ktime_to_ns(delta));
}
/*
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/