lkml.org 
[lkml]   [2006]   [Dec]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 18 Dec 2006 21:27:42 -0800
FromRandy Dunlap <>
Subject[PATCH] noinitramfs: correct initcall return type
From: Randy Dunlap <randy.dunlap@oracle.com>

Use expected function return type to fix warning.
init/noinitramfs.c:42: warning: initialization from incompatible pointer type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 init/noinitramfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.20-rc1-mm1.orig/init/noinitramfs.c
+++ linux-2.6.20-rc1-mm1/init/noinitramfs.c
@@ -29,7 +29,7 @@
 /*
  * Create a simple rootfs that is similar to the default initramfs
  */
-static void __init default_rootfs(void)
+static int __init default_rootfs(void)
 {
 	int mkdir_err = sys_mkdir("/dev", 0755);
 	int err = sys_mknod((const char __user *) "/dev/console",
@@ -38,5 +38,6 @@ static void __init default_rootfs(void)
 	if (err == -EROFS)
 		printk("Warning: Failed to create a rootfs\n");
 	mkdir_err = sys_mkdir("/root", 0700);
+	return 0;
 }
 rootfs_initcall(default_rootfs);

---
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-12-19 06:33    [from the cache]
©2003-2008