aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-08-12 01:04:18 -0400
committerRusty Russell <rusty@rustcorp.com.au>2010-08-11 09:34:19 -0400
commit914dcaa84c53f2c3efa6016efcae13fd92a8a17c (patch)
tree6bbcf8953012000cb0a22b47ff616ff2dbe481f2 /init/main.c
parenta1054322afc8120ea5a50bc84e5beeda54571862 (diff)
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/main.c')
-rw-r--r--init/main.c8
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, };
201char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; 201char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
202static const char *panic_later, *panic_param; 202static const char *panic_later, *panic_param;
203 203
204extern struct obs_kernel_param __setup_start[], __setup_end[]; 204extern const struct obs_kernel_param __setup_start[], __setup_end[];
205 205
206static int __init obsolete_checksetup(char *line) 206static int __init obsolete_checksetup(char *line)
207{ 207{
208 struct obs_kernel_param *p; 208 const struct obs_kernel_param *p;
209 int had_early_param = 0; 209 int had_early_param = 0;
210 210
211 p = __setup_start; 211 p = __setup_start;
@@ -458,7 +458,7 @@ static noinline void __init_refok rest_init(void)
458/* Check for early params. */ 458/* Check for early params. */
459static int __init do_early_param(char *param, char *val) 459static int __init do_early_param(char *param, char *val)
460{ 460{
461 struct obs_kernel_param *p; 461 const struct obs_kernel_param *p;
462 462
463 for (p = __setup_start; p < __setup_end; p++) { 463 for (p = __setup_start; p < __setup_end; p++) {
464 if ((p->early && strcmp(param, p->str) == 0) || 464 if ((p->early && strcmp(param, p->str) == 0) ||
@@ -536,7 +536,7 @@ static void __init mm_init(void)
536asmlinkage void __init start_kernel(void) 536asmlinkage void __init start_kernel(void)
537{ 537{
538 char * command_line; 538 char * command_line;
539 extern struct kernel_param __start___param[], __stop___param[]; 539 extern const struct kernel_param __start___param[], __stop___param[];
540 540
541 smp_setup_processor_id(); 541 smp_setup_processor_id();
542 542