From: Petr Mladek Date: Thu, 3 Apr 2014 21:48:38 +0000 (-0700) Subject: printk: remove duplicated check for log level X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0185698c0f543d4e8677bb97227ebe46024e3eb8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Jan Kara Cc: Michal Hocko Cc: Kay Sievers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) 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; }