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>
This commit is contained in:
WANG Cong
2008-02-04 22:30:41 -08:00
committed by Linus Torvalds
parent 9226b83847
commit c0a9290ecf
7 changed files with 12 additions and 13 deletions

View File

@@ -65,7 +65,7 @@ static void setup_highmem(unsigned long highmem_start,
void __init mem_init(void)
{
/* clear the zero-page */
memset((void *) empty_zero_page, 0, PAGE_SIZE);
memset(empty_zero_page, 0, PAGE_SIZE);
/* Map in the area just after the brk now that kmalloc is about
* to be turned on.

View File

@@ -60,8 +60,6 @@ unsigned long alloc_stack(int order, int atomic)
if (atomic)
flags = GFP_ATOMIC;
page = __get_free_pages(flags, order);
if (page == 0)
return 0;
return page;
}
@@ -331,7 +329,7 @@ void do_uml_exitcalls(void)
(*call)();
}
char *uml_strdup(char *string)
char *uml_strdup(const char *string)
{
return kstrdup(string, GFP_KERNEL);
}