Skip to contentSkip to conversation

init: add comments to keep initcall-names in sync with initcall levels

PATCH Applied Jim Cromie 3 participants 3 messages Jun 14, 2012 – Jun 18, 2012

lore
Share & tools
lore

Jim Cromie

author
#0 lore raw

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
index 6b95109..5e664f6 100644
@@ -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
index b5cc0a7..7a74087 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jim Cromie

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.

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
#2 lore raw
Quoted 7 lines · Borislav Petkov
Quoted 6 lines · Jim Cromie

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.

Quoted 7 lines
Quoted 1 line

This time I actually build-tested it.

Thanks.

Applied.

Thanks,
Rusty.