Commit 3d5dc24c authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] call virt_to_page() with void*, not UL

I'm sure there's a good reason for these functions to take virtual addresses
as unsigned longs, so suppress the warnings and cast them to the proper types
before calling the virt/phys conversion functions

A perfectly acceptable alternative would be to go and change free_pages() to
stop taking unsigned longs for virtual addresses, but this has a much smaller
impact.
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0d62f010
......@@ -798,8 +798,8 @@ EXPORT_SYMBOL(__free_pages);
fastcall void free_pages(unsigned long addr, unsigned int order)
{
if (addr != 0) {
BUG_ON(!virt_addr_valid(addr));
__free_pages(virt_to_page(addr), order);
BUG_ON(!virt_addr_valid((void *)addr));
__free_pages(virt_to_page((void *)addr), order);
}
}
......
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