Skip to contentSkip to conversation

tracing: Remove newline from trace_printk warning banner

PATCH In review Borislav Petkov 2 participants 2 messages Jan 27, 2015 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: Remove newline from trace_printk warning banner

From: Borislav Petkov <[email protected]>

Remove the output-confusing newline below:

[    0.191328]
**********************************************************
[    0.191493] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[    0.191586] **                                                      **

...

---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace.c +1 -1
index 4a9079b9f082..7a04946ffb06 100644
@@ -2036,7 +2036,7 @@ void trace_printk_init_buffers(void)
 
 	/* trace_printk() is for debug use only. Don't use it in production. */
 
-	pr_warning("\n**********************************************************\n");
+	pr_warning("**********************************************************\n");
 	pr_warning("**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **\n");
 	pr_warning("**                                                      **\n");
 	pr_warning("** trace_printk() being used. Allocating extra memory.  **\n");
Signature · 1 line
2.2.0.33.gc18b867
maintainer
#1 lore raw
Quoted 20 lines · On Tue, 27 Jan 2015 17:17:20 +0100 Borislav Petkov <[email protected]> wrote:

From: Borislav Petkov <[email protected]>

Remove the output-confusing newline below:

[    0.191328]
**********************************************************
[    0.191493] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[    0.191586] **                                                      **

...

---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace.c +0 -0
index 4a9079b9f082..7a04946ffb06 100644

kernel/trace/trace.c void trace_printk_init_buffers(void) · line 2039

Quoted 5 lines
kernel/trace/trace.c +1 -1
@@ -2036,7 +2036,7 @@ void trace_printk_init_buffers(void)
 
 	/* trace_printk() is for debug use only. Don't use it in production. */
 
-	pr_warning("\n**********************************************************\n");
+	pr_warning("**********************************************************\n");

Actually, could you just move the \n to another pr_warning. Because this can print on console text that makes it look weird too:

login: [ 0.191328] **********************************************************

[    0.191493] **   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **
[    0.191586] **                                                      **

-- Steve

Quoted 3 lines
kernel/trace/trace.c +0 -0
 	pr_warning("**   NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE   **\n");
 	pr_warning("**                                                      **\n");
 	pr_warning("** trace_printk() being used. Allocating extra memory.  **\n");