[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1392396456-19236-6-git-send-email-pmladek@suse.cz>
Date: Fri, 14 Feb 2014 17:47:36 +0100
From: Petr Mladek <pmladek@...e.cz>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Jan Kara <jack@...e.cz>, Michal Hocko <mhocko@...e.cz>,
LKML <linux-kernel@...r.kernel.org>,
Petr Mladek <pmladek@...e.cz>
Subject: [PATCH 5/5] 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: Petr Mladek <pmladek@...e.cz>
---
kernel/printk/printk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index a463707ca88f..9acbb9db1b43 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -351,7 +351,7 @@ static void log_store(int facility, int level,
else
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;
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists