From bd673c7c3b1681dbfabab0062e67398dadf806af Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 29 Jul 2008 22:33:36 -0700 Subject: initrd: cast `initrd_start' to `void *' commit fb6624ebd912e3d6907ca6490248e73368223da9 (initrd: Fix virtual/physical mix-up in overwrite test) introduced the compiler warning below on mips, as its virt_to_page() doesn't cast the passed address to unsigned long internally, unlike on most other architectures: init/main.c: In function `start_kernel': init/main.c:633: warning: passing argument 1 of `virt_to_phys' makes pointer from integer without a cast init/main.c:636: warning: passing argument 1 of `virt_to_phys' makes pointer from integer without a cast For now, kill the warning by explicitly casting initrd_start to `void *', as that's the type it should really be. Reported-by: Atsushi Nemoto Signed-off-by: Geert Uytterhoeven Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'init/main.c') diff --git a/init/main.c b/init/main.c index 20fdc9884b7..9c3b68b86ca 100644 --- a/init/main.c +++ b/init/main.c @@ -635,10 +635,11 @@ asmlinkage void __init start_kernel(void) #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && - page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) { + page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - " "disabling it.\n", - page_to_pfn(virt_to_page(initrd_start)), min_low_pfn); + page_to_pfn(virt_to_page((void *)initrd_start)), + min_low_pfn); initrd_start = 0; } #endif -- cgit v1.2.3