diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-04-13 06:32:09 -0400 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-07-30 06:25:44 -0400 |
commit | 5e6cafc83e30f0f70c79a2b7aef237dc57e29f02 (patch) | |
tree | 12b63c0bf097e2e455d49a41c9de1a97582a9710 /mm/vmalloc.c | |
parent | efc42bc98058a36d761b16a114823db1a902ed05 (diff) |
mm: vmalloc: use const void * for caller argument
'const void *' is a safer type for caller function type. This patch
updates all references to caller function type.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 2aad49981b57..11308f034f85 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -1280,7 +1280,7 @@ DEFINE_RWLOCK(vmlist_lock); | |||
1280 | struct vm_struct *vmlist; | 1280 | struct vm_struct *vmlist; |
1281 | 1281 | ||
1282 | static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, | 1282 | static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, |
1283 | unsigned long flags, void *caller) | 1283 | unsigned long flags, const void *caller) |
1284 | { | 1284 | { |
1285 | vm->flags = flags; | 1285 | vm->flags = flags; |
1286 | vm->addr = (void *)va->va_start; | 1286 | vm->addr = (void *)va->va_start; |
@@ -1306,7 +1306,7 @@ static void insert_vmalloc_vmlist(struct vm_struct *vm) | |||
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, | 1308 | static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, |
1309 | unsigned long flags, void *caller) | 1309 | unsigned long flags, const void *caller) |
1310 | { | 1310 | { |
1311 | setup_vmalloc_vm(vm, va, flags, caller); | 1311 | setup_vmalloc_vm(vm, va, flags, caller); |
1312 | insert_vmalloc_vmlist(vm); | 1312 | insert_vmalloc_vmlist(vm); |
@@ -1314,7 +1314,7 @@ static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, | |||
1314 | 1314 | ||
1315 | static struct vm_struct *__get_vm_area_node(unsigned long size, | 1315 | static struct vm_struct *__get_vm_area_node(unsigned long size, |
1316 | unsigned long align, unsigned long flags, unsigned long start, | 1316 | unsigned long align, unsigned long flags, unsigned long start, |
1317 | unsigned long end, int node, gfp_t gfp_mask, void *caller) | 1317 | unsigned long end, int node, gfp_t gfp_mask, const void *caller) |
1318 | { | 1318 | { |
1319 | struct vmap_area *va; | 1319 | struct vmap_area *va; |
1320 | struct vm_struct *area; | 1320 | struct vm_struct *area; |
@@ -1375,7 +1375,7 @@ EXPORT_SYMBOL_GPL(__get_vm_area); | |||
1375 | 1375 | ||
1376 | struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags, | 1376 | struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags, |
1377 | unsigned long start, unsigned long end, | 1377 | unsigned long start, unsigned long end, |
1378 | void *caller) | 1378 | const void *caller) |
1379 | { | 1379 | { |
1380 | return __get_vm_area_node(size, 1, flags, start, end, -1, GFP_KERNEL, | 1380 | return __get_vm_area_node(size, 1, flags, start, end, -1, GFP_KERNEL, |
1381 | caller); | 1381 | caller); |
@@ -1397,7 +1397,7 @@ struct vm_struct *get_vm_area(unsigned long size, unsigned long flags) | |||
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags, | 1399 | struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags, |
1400 | void *caller) | 1400 | const void *caller) |
1401 | { | 1401 | { |
1402 | return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END, | 1402 | return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END, |
1403 | -1, GFP_KERNEL, caller); | 1403 | -1, GFP_KERNEL, caller); |
@@ -1568,9 +1568,9 @@ EXPORT_SYMBOL(vmap); | |||
1568 | 1568 | ||
1569 | static void *__vmalloc_node(unsigned long size, unsigned long align, | 1569 | static void *__vmalloc_node(unsigned long size, unsigned long align, |
1570 | gfp_t gfp_mask, pgprot_t prot, | 1570 | gfp_t gfp_mask, pgprot_t prot, |
1571 | int node, void *caller); | 1571 | int node, const void *caller); |
1572 | static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, | 1572 | static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, |
1573 | pgprot_t prot, int node, void *caller) | 1573 | pgprot_t prot, int node, const void *caller) |
1574 | { | 1574 | { |
1575 | const int order = 0; | 1575 | const int order = 0; |
1576 | struct page **pages; | 1576 | struct page **pages; |
@@ -1643,7 +1643,7 @@ fail: | |||
1643 | */ | 1643 | */ |
1644 | void *__vmalloc_node_range(unsigned long size, unsigned long align, | 1644 | void *__vmalloc_node_range(unsigned long size, unsigned long align, |
1645 | unsigned long start, unsigned long end, gfp_t gfp_mask, | 1645 | unsigned long start, unsigned long end, gfp_t gfp_mask, |
1646 | pgprot_t prot, int node, void *caller) | 1646 | pgprot_t prot, int node, const void *caller) |
1647 | { | 1647 | { |
1648 | struct vm_struct *area; | 1648 | struct vm_struct *area; |
1649 | void *addr; | 1649 | void *addr; |
@@ -1699,7 +1699,7 @@ fail: | |||
1699 | */ | 1699 | */ |
1700 | static void *__vmalloc_node(unsigned long size, unsigned long align, | 1700 | static void *__vmalloc_node(unsigned long size, unsigned long align, |
1701 | gfp_t gfp_mask, pgprot_t prot, | 1701 | gfp_t gfp_mask, pgprot_t prot, |
1702 | int node, void *caller) | 1702 | int node, const void *caller) |
1703 | { | 1703 | { |
1704 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END, | 1704 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END, |
1705 | gfp_mask, prot, node, caller); | 1705 | gfp_mask, prot, node, caller); |