提交 0185698c 编写于 作者: P Petr Mladek 提交者: Linus Torvalds

printk: remove duplicated check for log level

The check for the exact log level is already done in printk_get_level.
We do not need to duplicate it in printk_skip_level.
Signed-off-by: NPetr Mladek <pmladek@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 708d96fd
......@@ -24,13 +24,9 @@ static inline int printk_get_level(const char *buffer)
static inline const char *printk_skip_level(const char *buffer)
{
if (printk_get_level(buffer)) {
switch (buffer[1]) {
case '0' ... '7':
case 'd': /* KERN_DEFAULT */
return buffer + 2;
}
}
if (printk_get_level(buffer))
return buffer + 2;
return buffer;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册