summaryrefslogtreecommitdiff
path: root/kernel/printk
diff options
context:
space:
mode:
authorHe Zhe <zhe.he@windriver.com>2018-09-30 00:45:52 +0800
committerPetr Mladek <pmladek@suse.com>2018-10-05 15:29:25 +0200
commitdd5adbfbfc50ff998909660c6158c0488f7b6a2b (patch)
treedf510c355a4527b05c92dddda883912f4fcef2c2 /kernel/printk
parent51a72ab7372d85c96104e58036f1b49ba11e5d2b (diff)
downloadlwn-dd5adbfbfc50ff998909660c6158c0488f7b6a2b.tar.gz
lwn-dd5adbfbfc50ff998909660c6158c0488f7b6a2b.zip
printk: Add KBUILD_MODNAME and remove a redundant print prefix
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>
Diffstat (limited to 'kernel/printk')
-rw-r--r--kernel/printk/printk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index d4704baf6aaf..15f3e70be448 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -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) {
/*