Commit 799c98cb authored by He Zhe's avatar He Zhe Committed by Greg Kroah-Hartman

printk: Correct wrong casting

[ Upstream commit 51a72ab7 ]

log_first_seq and console_seq are 64-bit unsigned integers.
Correct a wrong casting that might cut off the output.

Link: http://lkml.kernel.org/r/1538239553-81805-2-git-send-email-zhe.he@windriver.com
Cc: rostedt@goodmis.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
[sergey.senozhatsky@gmail.com: More descriptive commit message]
Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e7ff1141
......@@ -2358,8 +2358,9 @@ void console_unlock(void)
printk_safe_enter_irqsave(flags);
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));
len = sprintf(text,
"** %llu printk messages dropped **\n",
log_first_seq - console_seq);
/* messages are gone, move to first one */
console_seq = log_first_seq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment