aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/setup.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-07-26 09:55:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-07-26 09:55:59 -0400
commitff69a4c855066592f9e293cff8f54813614dd544 (patch)
treec1fcee172f8bfb62c7c6b970b0c9f57ae35f9df4 /arch/arm/kernel/setup.c
parent3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b (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.c12
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
75extern void paging_init(struct machine_desc *desc); 75extern void paging_init(const struct machine_desc *desc);
76extern void sanity_check_meminfo(void); 76extern void sanity_check_meminfo(void);
77extern enum reboot_mode reboot_mode; 77extern enum reboot_mode reboot_mode;
78extern void setup_dma_zone(struct machine_desc *desc); 78extern void setup_dma_zone(const struct machine_desc *desc);
79 79
80unsigned int processor_id; 80unsigned int processor_id;
81EXPORT_SYMBOL(processor_id); 81EXPORT_SYMBOL(processor_id);
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(elf_platform);
139static const char *cpu_name; 139static const char *cpu_name;
140static const char *machine_name; 140static const char *machine_name;
141static char __initdata cmd_line[COMMAND_LINE_SIZE]; 141static char __initdata cmd_line[COMMAND_LINE_SIZE];
142struct machine_desc *machine_desc __initdata; 142const struct machine_desc *machine_desc __initdata;
143 143
144static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } }; 144static 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
608void __init dump_machine_table(void) 608void __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}
695early_param("mem", early_mem); 695early_param("mem", early_mem);
696 696
697static void __init request_standard_resources(struct machine_desc *mdesc) 697static 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
851void __init setup_arch(char **cmdline_p) 851void __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);