aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2008-07-30 01:33:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:45 -0400
commitbd673c7c3b1681dbfabab0062e67398dadf806af (patch)
treeb2334952d5e070042fab29715a4ef228d0cd96a2 /init
parent06ac667903ebea8191d4f7e7fa4e0936161e25fe (diff)
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 <anemo@mba.ocn.ne.jp> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index 20fdc9884b77..9c3b68b86ca0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -635,10 +635,11 @@ asmlinkage void __init start_kernel(void)
635 635
636#ifdef CONFIG_BLK_DEV_INITRD 636#ifdef CONFIG_BLK_DEV_INITRD
637 if (initrd_start && !initrd_below_start_ok && 637 if (initrd_start && !initrd_below_start_ok &&
638 page_to_pfn(virt_to_page(initrd_start)) < min_low_pfn) { 638 page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) {
639 printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - " 639 printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
640 "disabling it.\n", 640 "disabling it.\n",
641 page_to_pfn(virt_to_page(initrd_start)), min_low_pfn); 641 page_to_pfn(virt_to_page((void *)initrd_start)),
642 min_low_pfn);
642 initrd_start = 0; 643 initrd_start = 0;
643 } 644 }
644#endif 645#endif