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/mm | |
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/mm')
-rw-r--r-- | arch/arm/mm/init.c | 5 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 4 | ||||
-rw-r--r-- | arch/arm/mm/nommu.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 15225d829d71..2958e74fc42c 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -231,7 +231,7 @@ static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole, | |||
231 | } | 231 | } |
232 | #endif | 232 | #endif |
233 | 233 | ||
234 | void __init setup_dma_zone(struct machine_desc *mdesc) | 234 | void __init setup_dma_zone(const struct machine_desc *mdesc) |
235 | { | 235 | { |
236 | #ifdef CONFIG_ZONE_DMA | 236 | #ifdef CONFIG_ZONE_DMA |
237 | if (mdesc->dma_zone_size) { | 237 | if (mdesc->dma_zone_size) { |
@@ -335,7 +335,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) | |||
335 | return phys; | 335 | return phys; |
336 | } | 336 | } |
337 | 337 | ||
338 | void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | 338 | void __init arm_memblock_init(struct meminfo *mi, |
339 | const struct machine_desc *mdesc) | ||
339 | { | 340 | { |
340 | int i; | 341 | int i; |
341 | 342 | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 4f56617a2392..56054ac8348e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -1151,7 +1151,7 @@ void __init arm_mm_memblock_reserve(void) | |||
1151 | * called function. This means you can't use any function or debugging | 1151 | * called function. This means you can't use any function or debugging |
1152 | * method which may touch any device, otherwise the kernel _will_ crash. | 1152 | * method which may touch any device, otherwise the kernel _will_ crash. |
1153 | */ | 1153 | */ |
1154 | static void __init devicemaps_init(struct machine_desc *mdesc) | 1154 | static void __init devicemaps_init(const struct machine_desc *mdesc) |
1155 | { | 1155 | { |
1156 | struct map_desc map; | 1156 | struct map_desc map; |
1157 | unsigned long addr; | 1157 | unsigned long addr; |
@@ -1272,7 +1272,7 @@ static void __init map_lowmem(void) | |||
1272 | * paging_init() sets up the page tables, initialises the zone memory | 1272 | * paging_init() sets up the page tables, initialises the zone memory |
1273 | * maps, and sets up the zero page, bad page and bad page tables. | 1273 | * maps, and sets up the zero page, bad page and bad page tables. |
1274 | */ | 1274 | */ |
1275 | void __init paging_init(struct machine_desc *mdesc) | 1275 | void __init paging_init(const struct machine_desc *mdesc) |
1276 | { | 1276 | { |
1277 | void *zero_page; | 1277 | void *zero_page; |
1278 | 1278 | ||
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 1fa50100ab6a..34d4ab217bab 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -299,7 +299,7 @@ void __init sanity_check_meminfo(void) | |||
299 | * paging_init() sets up the page tables, initialises the zone memory | 299 | * paging_init() sets up the page tables, initialises the zone memory |
300 | * maps, and sets up the zero page, bad page and bad page tables. | 300 | * maps, and sets up the zero page, bad page and bad page tables. |
301 | */ | 301 | */ |
302 | void __init paging_init(struct machine_desc *mdesc) | 302 | void __init paging_init(const struct machine_desc *mdesc) |
303 | { | 303 | { |
304 | early_trap_init((void *)CONFIG_VECTORS_BASE); | 304 | early_trap_init((void *)CONFIG_VECTORS_BASE); |
305 | mpu_setup(); | 305 | mpu_setup(); |