diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2010-08-12 07:04:18 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-08-11 15:34:19 +0200 |
commit | 914dcaa84c53f2c3efa6016efcae13fd92a8a17c (patch) | |
tree | 6bbcf8953012000cb0a22b47ff616ff2dbe481f2 /init | |
parent | param: use free hook for charp (fix leak of charp parameters) (diff) | |
download | linux-914dcaa84c53f2c3efa6016efcae13fd92a8a17c.tar.xz linux-914dcaa84c53f2c3efa6016efcae13fd92a8a17c.zip |
param: make param sections const.
Since this section can be read-only (they're in .rodata), they should
always have been const. Minor flow-through various functions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/init/main.c b/init/main.c index 86cbfd085b01..22d61cb06f98 100644 --- a/init/main.c +++ b/init/main.c @@ -201,11 +201,11 @@ static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; static const char *panic_later, *panic_param; -extern struct obs_kernel_param __setup_start[], __setup_end[]; +extern const struct obs_kernel_param __setup_start[], __setup_end[]; static int __init obsolete_checksetup(char *line) { - struct obs_kernel_param *p; + const struct obs_kernel_param *p; int had_early_param = 0; p = __setup_start; @@ -458,7 +458,7 @@ static noinline void __init_refok rest_init(void) /* Check for early params. */ static int __init do_early_param(char *param, char *val) { - struct obs_kernel_param *p; + const struct obs_kernel_param *p; for (p = __setup_start; p < __setup_end; p++) { if ((p->early && strcmp(param, p->str) == 0) || @@ -536,7 +536,7 @@ static void __init mm_init(void) asmlinkage void __init start_kernel(void) { char * command_line; - extern struct kernel_param __start___param[], __stop___param[]; + extern const struct kernel_param __start___param[], __stop___param[]; smp_setup_processor_id(); |