printk: Correct wrong casting

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/[email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: He Zhe <[email protected]>
[[email protected]: More descriptive commit message]
Reviewed-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
This commit is contained in:
He Zhe 2018-09-30 00:45:51 +08:00 • committed by Petr Mladek
commit 51a72ab737

View file

@ -2358,8 +2358,9 @@ again:
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;