Commit 14be1ebc authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] reduce casting in sysenter.c

Ran across this because it's another place where an unsigned long is passed
directly to __pa().  Making the "page" variable a void* seems a bit more
natural than an unsigned long and reduces the net number of casts by 1. 
Without it, we probably need another (void *) cast in the __pa() call.  

For more explanation as to why this was probably done originally, see this
post: http://marc.theaimsgroup.com/?l=linux-mm&m=109155379124628&w=2Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b7515483
...@@ -43,18 +43,18 @@ extern const char vsyscall_sysenter_start, vsyscall_sysenter_end; ...@@ -43,18 +43,18 @@ extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
static int __init sysenter_setup(void) static int __init sysenter_setup(void)
{ {
unsigned long page = get_zeroed_page(GFP_ATOMIC); void *page = (void *)get_zeroed_page(GFP_ATOMIC);
__set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC); __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
if (!boot_cpu_has(X86_FEATURE_SEP)) { if (!boot_cpu_has(X86_FEATURE_SEP)) {
memcpy((void *) page, memcpy(page,
&vsyscall_int80_start, &vsyscall_int80_start,
&vsyscall_int80_end - &vsyscall_int80_start); &vsyscall_int80_end - &vsyscall_int80_start);
return 0; return 0;
} }
memcpy((void *) page, memcpy(page,
&vsyscall_sysenter_start, &vsyscall_sysenter_start,
&vsyscall_sysenter_end - &vsyscall_sysenter_start); &vsyscall_sysenter_end - &vsyscall_sysenter_start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment