]> git.hungrycats.org Git - linux/commitdiff
[PATCH] call virt_to_page() with void*, not UL
authorDave Hansen <haveblue@us.ibm.com>
Fri, 27 Aug 2004 03:35:14 +0000 (20:35 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 27 Aug 2004 03:35:14 +0000 (20:35 -0700)
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: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/page_alloc.c

index d156d5dab9d9932643cd596e807a556a390d7def..ce877b9e223e6d721eaa4fcfa394dfea645e5cc7 100644 (file)
@@ -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);
        }
 }