From 537df61e8385244a741f8cf4c6611f80f3f952e2 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 19 Jun 2013 10:07:08 +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