printk: remove duplicated check for log level
authorPetr Mladek <pmladek@suse.cz>
Thu, 3 Apr 2014 21:48:38 +0000 (14:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:07 +0000 (16:21 -0700)
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: Petr 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/printk.h

index fa47e2708c01748a958f40300c900673cfaa3777..8860575899f21687a9947055f915a561c1fca640 100644 (file)
@@ -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;
 }