...and define pr_fmt

Cc: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Fabian Frederick <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to