Commit fce6e033 authored by Petr Mladek's avatar Petr Mladek Committed by Linus Torvalds
Browse files

printk: do not compute the size of the message twice

This is just a tiny optimization.  It removes duplicate computation of
the message size.
Signed-off-by: default avatarPetr Mladek <>
Cc: Steven Rostedt <>
Cc: Frederic Weisbecker <>
Cc: Jan Kara <>
Cc: Michal Hocko <>
Cc: Kay Sievers <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 39b25109
......@@ -351,7 +351,7 @@ static void log_store(int facility, int level,
msg->ts_nsec = local_clock();
memset(log_dict(msg) + dict_len, 0, pad_len);
msg->len = sizeof(struct printk_log) + text_len + dict_len + pad_len;
msg->len = size;
/* insert message */
log_next_idx += msg->len;
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