init: add comments to keep initcall-names in sync with initcall levels
PATCH 1/1 init: add comments to keep initcall-names in sync with initcall levels
main.c has initcall_level_names[] for parse_args to print in debug messages, add comments to keep them in sync with initcalls defined in init.h.
Also add "loadable" into comment re not using *_initcall macros in modules, to disambiguate from kernel/params.c and other builtins.
--- include/linux/init.h | 3 ++- init/main.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
include/linux/init.h +2 -1
@@ -191,6 +191,7 @@ extern bool initcall_debug;* initializes variables that couldn't be statically initialized. * * This only exists for built-in code, not for modules. +* Keep main.c:initcall_level_names[] in sync. */ #define pure_initcall (fn) __define_initcall("0",fn,0)
@@ -280,7 +281,7 @@ void __init parse_early_options(char *cmdline);#else /* MODULE */ -/* Don't use these in modules, but some people do... */ +/* Don't use these in loadable modules, but some people do... */ #define early_initcall (fn) module_init(fn)#define core_initcall (fn) module_init(fn)#define postcore_initcall (fn) module_init(fn)
init/main.c +1 -0
@@ -724,6 +724,7 @@ static initcall_t *initcall_levels[] __initdata = { __initcall_end, }; +/* Keep these in sync with initcalls in include/linux/init.h */ static char *initcall_level_names[]__initdata = {"early" ,"core" ,
Signature · 1 line
1.7.10.2
Quoted 7 lines · Jim Cromie
main.chas initcall_level_names[] forparse_argsto print in debug messages, add comments to keep them in sync with initcalls defined ininit.h.Also add "loadable" into comment re not using
*_initcallmacros in modules, to disambiguate fromkernel/params.cand other builtins.Signed-off-by Jim Cromie <[email protected]>
This time I actually build-tested it.
Thanks.
Signature · 8 lines
Regards/Gruss, Boris. Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach GM: Alberto Bozzo Reg: Dornach, Landkreis Muenchen HRB Nr. 43632 WEEE Registernr: 129 19551
Rusty Russell
AppliedQuoted 7 lines · Borislav Petkov
Quoted 6 lines · Jim Cromie
main.chas initcall_level_names[] forparse_argsto print in debug messages, add comments to keep them in sync with initcalls defined ininit.h.Also add "loadable" into comment re not using
*_initcallmacros in modules, to disambiguate fromkernel/params.cand other builtins.
Quoted 7 lines
Quoted 1 line
Signed-off-by Jim Cromie <[email protected]>This time I actually build-tested it.
Acked-by Borislav Petkov <[email protected]>Thanks.
Applied.
Thanks,
Rusty.