From 19df26ab6d1d4c6a2e6305e5ed30b430027b8c04 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 23 May 2013 10:37:25 +1000 Subject: [PATCH] dump_stack-serialize-the-output-from-dump_stack-fix - fix comment indenting - avoid inclusion of files - use where possible - fix uniprocessor build (__dump_stack undefined) - remove unneeded ifdef around smp.h inclusion Cc: Alex Thorlton Cc: David S. Miller Cc: Jesper Nilsson Cc: Richard Kuo Cc: Robin Holt Cc: Russ Anderson Cc: Vineet Gupta Cc: athorlton@sgi.com Signed-off-by: Andrew Morton --- lib/dump_stack.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/lib/dump_stack.c b/lib/dump_stack.c index 710884b6a989..c03154173cc7 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c @@ -6,12 +6,14 @@ #include #include #include -#include -#include - -#ifdef CONFIG_SMP #include -#endif +#include + +static void __dump_stack(void) +{ + dump_stack_print_info(KERN_DEFAULT); + show_stack(NULL, NULL); +} /** * dump_stack - dump the current task information and its stack trace @@ -27,10 +29,10 @@ void dump_stack(void) int old; int cpu; - /* - * Permit this cpu to perform nested stack dumps while serialising - * against other CPUs - */ + /* + * Permit this cpu to perform nested stack dumps while serialising + * against other CPUs + */ preempt_disable(); retry: @@ -59,9 +61,3 @@ void dump_stack(void) } #endif EXPORT_SYMBOL(dump_stack); - -static void __dump_stack(void) -{ - dump_stack_print_info(KERN_DEFAULT); - show_stack(NULL, NULL); -} -- 2.39.5