From 3d5dc24c21c7240a1f38076786c70b466936a088 Mon Sep 17 00:00:00 2001 From: Dave Hansen Date: Thu, 26 Aug 2004 20:35:14 -0700 Subject: [PATCH] [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: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d156d5dab9d99..ce877b9e223e6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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); } } -- 2.53.0