From 5765fb24075cca4c54b04f2da2d39452b9c43dd1 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 7 Jun 2013 10:08:38 +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