diff options
| author | Petr Mladek <pmladek@suse.cz> | 2014-04-03 17:48:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:21:07 -0400 |
| commit | 0185698c0f543d4e8677bb97227ebe46024e3eb8 (patch) | |
| tree | 2630cfc5a041947d382d58cb3112d4f594c3d257 /include | |
| parent | 708d96fd060bd1e729fc93048cea8901f8bacb7c (diff) | |
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: 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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/printk.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index fa47e2708c01..8860575899f2 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -24,13 +24,9 @@ static inline int printk_get_level(const char *buffer) | |||
| 24 | 24 | ||
| 25 | static inline const char *printk_skip_level(const char *buffer) | 25 | static inline const char *printk_skip_level(const char *buffer) |
| 26 | { | 26 | { |
| 27 | if (printk_get_level(buffer)) { | 27 | if (printk_get_level(buffer)) |
| 28 | switch (buffer[1]) { | 28 | return buffer + 2; |
| 29 | case '0' ... '7': | 29 | |
| 30 | case 'd': /* KERN_DEFAULT */ | ||
| 31 | return buffer + 2; | ||
| 32 | } | ||
| 33 | } | ||
| 34 | return buffer; | 30 | return buffer; |
| 35 | } | 31 | } |
| 36 | 32 | ||
