Message ID | 9372251c3be268eb5e8494d81c4cb0788b287ba9.1425502513.git.iulia.manda21@gmail.com |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/linux/init.h b/include/linux/init.h index ce6d39b..e55db5c 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -163,7 +163,7 @@ extern void (*late_time_init)(void); static const type var = val #endif -extern bool initcall_debug; +DECLARE_CORE_PARAM(initcall_debug, false, bool); #endif diff --git a/init/main.c b/init/main.c index 6f0f1c5f..85e9001 100644 --- a/init/main.c +++ b/init/main.c @@ -685,8 +685,7 @@ static void __init do_ctors(void) #endif } -bool initcall_debug; -core_param(initcall_debug, initcall_debug, bool, 0644); +DEFINE_CORE_PARAM(initcall_debug, initcall_debug, false, bool, 0644); #ifdef CONFIG_KALLSYMS struct blacklist_entry {
Test the previously implemented macros on initcall_debug parameter, after setting CONFIG_CMDLINE_PARSE to 'n'. The variable corresponding to initcall_debug kernel parameter is set by default to false. Even though DEFINE_CORE_PARAM resumes to nothing when CONFIG_CMDLINE_PARSE is not set, we need to use it in main.c so that it is still defined when this option is 'y'. Bloat-o-meter output: add/remove: 0/3 grow/shrink: 0/9 up/down: 0/-385 (-385) function old new delta initcall_debug 1 - -1 pm_init 105 100 -5 __param_str_initcall_debug 15 - -15 __param_initcall_debug 16 - -16 syscore_suspend 247 224 -23 syscore_resume 175 152 -23 syscore_shutdown 80 55 -25 pci_fixup_device 235 198 -37 async_synchronize_cookie_domain 162 116 -46 async_run_entry_fn 178 127 -51 device_shutdown 256 204 -52 do_one_initcall 339 248 -91 Signed-off-by: Iulia Manda <iulia.manda21@gmail.com> --- Changes since v1: - use "false" as a default value for bool type include/linux/init.h | 2 +- init/main.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)