summaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2013-07-03 18:05:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:45 -0400
commitff1c8fac88ab8e7dac65236b277908c7c5c7ab09 (patch)
tree83d3dc572683e7151e4f2ec9ecea5ff8ad5e007f /init/main.c
parent351b2a1fe2d06f44b4c06d377744b2ac408b7407 (diff)
init: remove permanent string buffer from do_one_initcall()
do_one_initcall() uses a 64 byte string buffer to save a message. This buffer is declared static and is only used at boot up and when a module is loaded. As 64 bytes is very small, and this function has very limited scope, there's no reason to waste permanent memory with this string and not just simply put it on the stack. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index ec549581d732..f2366533c922 100644
--- a/init/main.c
+++ b/init/main.c
@@ -655,8 +655,6 @@ static void __init do_ctors(void)
655bool initcall_debug; 655bool initcall_debug;
656core_param(initcall_debug, initcall_debug, bool, 0644); 656core_param(initcall_debug, initcall_debug, bool, 0644);
657 657
658static char msgbuf[64];
659
660static int __init_or_module do_one_initcall_debug(initcall_t fn) 658static int __init_or_module do_one_initcall_debug(initcall_t fn)
661{ 659{
662 ktime_t calltime, delta, rettime; 660 ktime_t calltime, delta, rettime;
@@ -679,6 +677,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
679{ 677{
680 int count = preempt_count(); 678 int count = preempt_count();
681 int ret; 679 int ret;
680 char msgbuf[64];
682 681
683 if (initcall_debug) 682 if (initcall_debug)
684 ret = do_one_initcall_debug(fn); 683 ret = do_one_initcall_debug(fn);