diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2013-07-04 00:05:37 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 01:07:45 +0200 |
commit | ff1c8fac88ab8e7dac65236b277908c7c5c7ab09 (patch) | |
tree | 83d3dc572683e7151e4f2ec9ecea5ff8ad5e007f /init/main.c | |
parent | checkpatch: cache last camelcase hash as .checkpatch-camelcase.<commit> (diff) | |
download | linux-ff1c8fac88ab8e7dac65236b277908c7c5c7ab09.tar.xz linux-ff1c8fac88ab8e7dac65236b277908c7c5c7ab09.zip |
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.c | 3 |
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) bool initcall_debug; core_param(initcall_debug, initcall_debug, bool, 0644); -static char msgbuf[64]; - static int __init_or_module do_one_initcall_debug(initcall_t fn) { ktime_t calltime, delta, rettime; @@ -679,6 +677,7 @@ int __init_or_module do_one_initcall(initcall_t fn) { int count = preempt_count(); int ret; + char msgbuf[64]; if (initcall_debug) ret = do_one_initcall_debug(fn); |