Commit ff1c8fac authored by Steven Rostedt's avatar Steven Rostedt Committed by Linus Torvalds

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: default avatarSteven Rostedt <rostedt@goodmis.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 351b2a1f
...@@ -655,8 +655,6 @@ static void __init do_ctors(void) ...@@ -655,8 +655,6 @@ static void __init do_ctors(void)
bool initcall_debug; bool initcall_debug;
core_param(initcall_debug, initcall_debug, bool, 0644); core_param(initcall_debug, initcall_debug, bool, 0644);
static char msgbuf[64];
static int __init_or_module do_one_initcall_debug(initcall_t fn) static int __init_or_module do_one_initcall_debug(initcall_t fn)
{ {
ktime_t calltime, delta, rettime; ktime_t calltime, delta, rettime;
...@@ -679,6 +677,7 @@ int __init_or_module do_one_initcall(initcall_t fn) ...@@ -679,6 +677,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
{ {
int count = preempt_count(); int count = preempt_count();
int ret; int ret;
char msgbuf[64];
if (initcall_debug) if (initcall_debug)
ret = do_one_initcall_debug(fn); ret = do_one_initcall_debug(fn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment