path: root/arch/alpha/mm
diff options
authorJiang Liu <>2013-07-03 15:02:48 -0700
committerLinus Torvalds <>2013-07-03 16:07:32 -0700
commit11199692d83dd3fe1511203024fb9853d176ec4c (patch)
treea8632c310774eef2928f24d5aca81d1203dd54b8 /arch/alpha/mm
parentdcf6b7ddd7df8965727746f89c59229b23180e5a (diff)
mm: change signature of free_reserved_area() to fix building warnings
Change signature of free_reserved_area() according to Russell King's suggestion to fix following build warnings: arch/arm/mm/init.c: In function 'mem_init': arch/arm/mm/init.c:603:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default] free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL); ^ In file included from include/linux/mman.h:4:0, from arch/arm/mm/init.c:15: include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'void *' extern unsigned long free_reserved_area(unsigned long start, unsigned long end, mm/page_alloc.c: In function 'free_reserved_area': >> mm/page_alloc.c:5134:3: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [enabled by default] In file included from arch/mips/include/asm/page.h:49:0, from include/linux/mmzone.h:20, from include/linux/gfp.h:4, from include/linux/mm.h:8, from mm/page_alloc.c:18: arch/mips/include/asm/io.h:119:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int' mm/page_alloc.c: In function 'free_area_init_nodes': mm/page_alloc.c:5030:34: warning: array subscript is below array bounds [-Warray-bounds] Also address some minor code review comments. Signed-off-by: Jiang Liu <> Reported-by: Arnd Bergmann <> Cc: "H. Peter Anvin" <> Cc: "Michael S. Tsirkin" <> Cc: <> Cc: Catalin Marinas <> Cc: Chris Metcalf <> Cc: David Howells <> Cc: Geert Uytterhoeven <> Cc: Ingo Molnar <> Cc: Jeremy Fitzhardinge <> Cc: Jianguo Wu <> Cc: Joonsoo Kim <> Cc: Kamezawa Hiroyuki <> Cc: Konrad Rzeszutek Wilk <> Cc: Marek Szyprowski <> Cc: Mel Gorman <> Cc: Michel Lespinasse <> Cc: Minchan Kim <> Cc: Rik van Riel <> Cc: Rusty Russell <> Cc: Tang Chen <> Cc: Tejun Heo <> Cc: Thomas Gleixner <> Cc: Wen Congyang <> Cc: Will Deacon <> Cc: Yasuaki Ishimatsu <> Cc: Yinghai Lu <> Cc: Russell King <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'arch/alpha/mm')
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 0ba85ee4a466..d54848d4e464 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -326,6 +326,6 @@ free_initmem(void)
free_initrd_mem(unsigned long start, unsigned long end)
- free_reserved_area(start, end, 0, "initrd");
+ free_reserved_area((void *)start, (void *)end, 0, "initrd");