printk: Add KBUILD_MODNAME and remove a redundant print prefix
authorHe Zhe <zhe.he@windriver.com>
Sat, 29 Sep 2018 16:45:52 +0000 (00:45 +0800)
committerPetr Mladek <pmladek@suse.com>
Fri, 5 Oct 2018 13:29:25 +0000 (15:29 +0200)
Add KBUILD_MODNAME to make prints more clear.

Link: http://lkml.kernel.org/r/1538239553-81805-3-git-send-email-zhe.he@windriver.com
Cc: rostedt@goodmis.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: He Zhe <zhe.he@windriver.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk.c

index d4704ba..15f3e70 100644 (file)
@@ -16,6 +16,8 @@
  *     01Mar01 Andrew Morton
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/tty.h>
@@ -2699,7 +2701,7 @@ void register_console(struct console *newcon)
 
        if (newcon->flags & CON_EXTENDED)
                if (!nr_ext_console_drivers++)
-                       pr_info("printk: continuation disabled due to ext consoles, expect more fragments in /dev/kmsg\n");
+                       pr_info("continuation disabled due to ext consoles, expect more fragments in /dev/kmsg\n");
 
        if (newcon->flags & CON_PRINTBUFFER) {
                /*