[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-8fad7ec51e1b9e262e0bdd34e800ac1ea5e84dec@git.kernel.org>
Date: Thu, 31 Mar 2016 23:37:07 -0700
From: tip-bot for Rasmus Villemoes <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, jslaby@...e.cz, linux-kernel@...r.kernel.org,
hpa@...or.com, linux@...musvillemoes.dk,
torvalds@...ux-foundation.org, mingo@...nel.org,
peterz@...radead.org
Subject: [tip:x86/debug] x86/dumpstack: Combine some printk()s
Commit-ID: 8fad7ec51e1b9e262e0bdd34e800ac1ea5e84dec
Gitweb: http://git.kernel.org/tip/8fad7ec51e1b9e262e0bdd34e800ac1ea5e84dec
Author: Rasmus Villemoes <linux@...musvillemoes.dk>
AuthorDate: Sat, 26 Mar 2016 21:40:16 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 31 Mar 2016 15:33:03 +0200
x86/dumpstack: Combine some printk()s
Long ago, Jiri Slaby noted that the subsequent printk()s should be
pr_cont(). Let's instead get rid of the multiple printk calls.
Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Jiri Slaby <jslaby@...e.cz>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1459024817-27122-1-git-send-email-linux@rasmusvillemoes.dk
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/dumpstack.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 8efa57a..2bb25c3 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -260,19 +260,12 @@ int __die(const char *str, struct pt_regs *regs, long err)
unsigned long sp;
#endif
printk(KERN_DEFAULT
- "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
-#ifdef CONFIG_PREEMPT
- printk("PREEMPT ");
-#endif
-#ifdef CONFIG_SMP
- printk("SMP ");
-#endif
- if (debug_pagealloc_enabled())
- printk("DEBUG_PAGEALLOC ");
-#ifdef CONFIG_KASAN
- printk("KASAN");
-#endif
- printk("\n");
+ "%s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff, ++die_counter,
+ IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
+ IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
+ debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
+ IS_ENABLED(CONFIG_KASAN) ? " KASAN" : "");
+
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
return 1;
Powered by blists - more mailing lists