diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-07-26 09:55:59 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-07-26 09:55:59 -0400 |
commit | ff69a4c855066592f9e293cff8f54813614dd544 (patch) | |
tree | c1fcee172f8bfb62c7c6b970b0c9f57ae35f9df4 /arch/arm/kernel/setup.c | |
parent | 3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b (diff) |
ARM: constify machine_desc structure uses
struct machine_desc records are defined everywhere as a 'const'
structure, but unfortuantely it loses its const-ness through the use of
linker magic - the symbols which surround the section are not declared
const so it becomes possible not to use 'const' for pointers to these
const structures.
Let's fix this oversight - all pointers to these structures should be
marked const too.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 63af9a7ae512..863629989f02 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -72,10 +72,10 @@ static int __init fpe_setup(char *line) | |||
72 | __setup("fpe=", fpe_setup); | 72 | __setup("fpe=", fpe_setup); |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | extern void paging_init(struct machine_desc *desc); | 75 | extern void paging_init(const struct machine_desc *desc); |
76 | extern void sanity_check_meminfo(void); | 76 | extern void sanity_check_meminfo(void); |
77 | extern enum reboot_mode reboot_mode; | 77 | extern enum reboot_mode reboot_mode; |
78 | extern void setup_dma_zone(struct machine_desc *desc); | 78 | extern void setup_dma_zone(const struct machine_desc *desc); |
79 | 79 | ||
80 | unsigned int processor_id; | 80 | unsigned int processor_id; |
81 | EXPORT_SYMBOL(processor_id); | 81 | EXPORT_SYMBOL(processor_id); |
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(elf_platform); | |||
139 | static const char *cpu_name; | 139 | static const char *cpu_name; |
140 | static const char *machine_name; | 140 | static const char *machine_name; |
141 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; | 141 | static char __initdata cmd_line[COMMAND_LINE_SIZE]; |
142 | struct machine_desc *machine_desc __initdata; | 142 | const struct machine_desc *machine_desc __initdata; |
143 | 143 | ||
144 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; | 144 | static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; |
145 | #define ENDIANNESS ((char)endian_test.l) | 145 | #define ENDIANNESS ((char)endian_test.l) |
@@ -607,7 +607,7 @@ static void __init setup_processor(void) | |||
607 | 607 | ||
608 | void __init dump_machine_table(void) | 608 | void __init dump_machine_table(void) |
609 | { | 609 | { |
610 | struct machine_desc *p; | 610 | const struct machine_desc *p; |
611 | 611 | ||
612 | early_print("Available machine support:\n\nID (hex)\tNAME\n"); | 612 | early_print("Available machine support:\n\nID (hex)\tNAME\n"); |
613 | for_each_machine_desc(p) | 613 | for_each_machine_desc(p) |
@@ -694,7 +694,7 @@ static int __init early_mem(char *p) | |||
694 | } | 694 | } |
695 | early_param("mem", early_mem); | 695 | early_param("mem", early_mem); |
696 | 696 | ||
697 | static void __init request_standard_resources(struct machine_desc *mdesc) | 697 | static void __init request_standard_resources(const struct machine_desc *mdesc) |
698 | { | 698 | { |
699 | struct memblock_region *region; | 699 | struct memblock_region *region; |
700 | struct resource *res; | 700 | struct resource *res; |
@@ -850,7 +850,7 @@ void __init hyp_mode_check(void) | |||
850 | 850 | ||
851 | void __init setup_arch(char **cmdline_p) | 851 | void __init setup_arch(char **cmdline_p) |
852 | { | 852 | { |
853 | struct machine_desc *mdesc; | 853 | const struct machine_desc *mdesc; |
854 | 854 | ||
855 | setup_processor(); | 855 | setup_processor(); |
856 | mdesc = setup_machine_fdt(__atags_pointer); | 856 | mdesc = setup_machine_fdt(__atags_pointer); |