Skip to contentSkip to conversation

+ printk-remove-duplicated-check-for-log-level.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Feb 18, 2014 Printk

lore
Share & tools
lore
#0 lore raw

Subject: + printk-remove-duplicated-check-for-log-level.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 18 Feb 2014 13:03:42 -0800

The patch titled
Subject: printk: remove duplicated check for log level
has been added to the -mm tree. Its filename is
printk-remove-duplicated-check-for-log-level.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/printk-remove-duplicated-check-for-log-level.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/printk-remove-duplicated-check-for-log-level.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Petr Mladek <[email protected]>
Subject: 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.

Cc Steven Rostedt <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jan Kara <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Kay Sievers <[email protected]>

---

 include/linux/printk.h |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
include/linux/printk.h renamed from include/linux/printk.h~printk-remove-duplicated-check-for-log-level +3 -7
diff -puN include/linux/printk.h~printk-remove-duplicated-check-for-log-level include/linux/printk.h
@@ -24,13 +24,9 @@ static inline int printk_get_level(const
 
 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;
 }
 

_

Patches currently in -mm which might be from [email protected] are

printk-remove-duplicated-check-for-log-level.patch printk-remove-obsolete-check-for-log-level-c.patch printk-add-comment-about-tricky-check-for-text-buffer-size.patch printk-use-also-the-last-bytes-in-the-ring-buffer.patch printk-do-not-compute-the-size-of-the-message-twice.patch