Skip to content

Commit

Permalink
printk: drop call_console_drivers() unused param
Browse files Browse the repository at this point in the history
We do suppress_message_printing() check before we call
call_console_drivers() now, so `level' param is not needed
anymore.

Link: http://lkml.kernel.org/r/20161224140902.1962-2-sergey.senozhatsky@gmail.com
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
  • Loading branch information
Sergey Senozhatsky authored and Petr Mladek committed Feb 8, 2017
1 parent de6fcbd commit d9c2352
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,8 +1558,7 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len)
* log_buf[start] to log_buf[end - 1].
* The console_lock must be held.
*/
static void call_console_drivers(int level,
const char *ext_text, size_t ext_len,
static void call_console_drivers(const char *ext_text, size_t ext_len,
const char *text, size_t len)
{
struct console *con;
Expand Down Expand Up @@ -1866,8 +1865,7 @@ static ssize_t msg_print_ext_header(char *buf, size_t size,
static ssize_t msg_print_ext_body(char *buf, size_t size,
char *dict, size_t dict_len,
char *text, size_t text_len) { return 0; }
static void call_console_drivers(int level,
const char *ext_text, size_t ext_len,
static void call_console_drivers(const char *ext_text, size_t ext_len,
const char *text, size_t len) {}
static size_t msg_print_text(const struct printk_log *msg,
bool syslog, char *buf, size_t size) { return 0; }
Expand Down Expand Up @@ -2188,7 +2186,6 @@ void console_unlock(void)
struct printk_log *msg;
size_t ext_len = 0;
size_t len;
int level;

printk_safe_enter_irqsave(flags);
raw_spin_lock(&logbuf_lock);
Expand All @@ -2212,8 +2209,7 @@ void console_unlock(void)
break;

msg = log_from_idx(console_idx);
level = msg->level;
if (suppress_message_printing(level)) {
if (suppress_message_printing(msg->level)) {
/*
* Skip record we have buffered and already printed
* directly to the console when we received it, and
Expand All @@ -2239,7 +2235,7 @@ void console_unlock(void)
raw_spin_unlock(&logbuf_lock);

stop_critical_timings(); /* don't trace print latency */
call_console_drivers(level, ext_text, ext_len, text, len);
call_console_drivers(ext_text, ext_len, text, len);
start_critical_timings();
printk_safe_exit_irqrestore(flags);

Expand Down

0 comments on commit d9c2352

Please sign in to comment.