aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2008-02-05 01:30:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:25 -0500
commitc0a9290ecf0dbb89958cb3a3f78964015a7de402 (patch)
tree1a987905fe5047cd74966149fc11689713cd7bea /arch/um/kernel
parent9226b8384776798986640ce07764d17ba66aa54f (diff)
uml: const and other tidying
This patch also does some improvements for uml code. Improvements include dropping unnecessary cast, killing some unnecessary code and still some constifying for pointers etc.. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/mem.c2
-rw-r--r--arch/um/kernel/process.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index e3e72418f241..96072e27a0e7 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -65,7 +65,7 @@ static void setup_highmem(unsigned long highmem_start,
65void __init mem_init(void) 65void __init mem_init(void)
66{ 66{
67 /* clear the zero-page */ 67 /* clear the zero-page */
68 memset((void *) empty_zero_page, 0, PAGE_SIZE); 68 memset(empty_zero_page, 0, PAGE_SIZE);
69 69
70 /* Map in the area just after the brk now that kmalloc is about 70 /* Map in the area just after the brk now that kmalloc is about
71 * to be turned on. 71 * to be turned on.
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index c7ea7f2a8945..91bd68eaba20 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -60,8 +60,6 @@ unsigned long alloc_stack(int order, int atomic)
60 if (atomic) 60 if (atomic)
61 flags = GFP_ATOMIC; 61 flags = GFP_ATOMIC;
62 page = __get_free_pages(flags, order); 62 page = __get_free_pages(flags, order);
63 if (page == 0)
64 return 0;
65 63
66 return page; 64 return page;
67} 65}
@@ -331,7 +329,7 @@ void do_uml_exitcalls(void)
331 (*call)(); 329 (*call)();
332} 330}
333 331
334char *uml_strdup(char *string) 332char *uml_strdup(const char *string)
335{ 333{
336 return kstrdup(string, GFP_KERNEL); 334 return kstrdup(string, GFP_KERNEL);
337} 335}