lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 19 Sep 2018 01:17:48 +0800
From:   <zhe.he@...driver.com>
To:     <pmladek@...e.com>, <sergey.senozhatsky@...il.com>,
        <rostedt@...dmis.org>, <linux-kernel@...r.kernel.org>
CC:     <zhe.he@...driver.com>
Subject: [PATCH v2 2/2] printk: Add KBUILD_MODNAME and correct bare use of unsigned

From: He Zhe <zhe.he@...driver.com>

Add KBUILD_MODNAME to make prints more clear. And use 'unsigned int' intead
of 'unsigned' according to checkpatch.pl's suggestion.

Signed-off-by: He Zhe <zhe.he@...driver.com>
Cc: pmladek@...e.com
Cc: sergey.senozhatsky@...il.com
Cc: rostedt@...dmis.org
---
v2:
Correct one more place

 kernel/printk/printk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 34c0403..ece870f 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>
@@ -1048,7 +1050,7 @@ static void __init log_buf_len_update(unsigned size)
 /* save requested log_buf_len since it's too early to process it */
 static int __init log_buf_len_setup(char *str)
 {
-	unsigned size;
+	unsigned int size;
 
 	if (!str) {
 		pr_err("Config string not provided\n");
@@ -2359,7 +2361,7 @@ void console_unlock(void)
 		raw_spin_lock(&logbuf_lock);
 		if (console_seq < log_first_seq) {
 			len = sprintf(text, "** %u printk messages dropped **\n",
-				      (unsigned)(log_first_seq - console_seq));
+				   (unsigned int)(log_first_seq - console_seq));
 
 			/* messages are gone, move to first one */
 			console_seq = log_first_seq;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ