Skip to contentSkip to conversation

noinitramfs: correct initcall return type

PATCH New Randy Dunlap 1 participant 1 message Dec 19, 2006 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 noinitramfs: correct initcall return type

From: Randy Dunlap <[email protected]>

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

---
 init/noinitramfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
init/noinitramfs.c +2 -1
@@ -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);

---