[PATCH] UBUNTU: SAUCE: async_populate_rootfs: fix build warnings

Herton Ronaldo Krzesinski herton.krzesinski at canonical.com
Tue May 22 18:23:02 UTC 2012


Fix following build warnings:

init/initramfs.c: In function 'populate_rootfs_early':
init/initramfs.c:629:7: warning: passing argument 1 of 'async_schedule_domain' from incompatible pointer type [enabled by default]
include/linux/async.h:20:23: note: expected 'void (*)(void *, async_cookie_t)' but argument is of type 'void (*)(void)'
init/initramfs.c:631:1: warning: no return statement in function returning non-void [-Wreturn-type]
init/initramfs.c: In function 'populate_rootfs':
init/initramfs.c:636:7: warning: passing argument 1 of 'async_schedule_domain' from incompatible pointer type [enabled by default]
include/linux/async.h:20:23: note: expected 'void (*)(void *, async_cookie_t)' but argument is of type 'void (*)(void)'
init/initramfs.c:637:1: warning: no return statement in function returning non-void [-Wreturn-type]

Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
---
 init/initramfs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch applies from Natty to Quantal.
It's just build warnings, but if desired I can open a bug and do the formal SRU.

diff --git a/init/initramfs.c b/init/initramfs.c
index 2d47aca..da4e927 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -579,7 +579,7 @@ void populate_rootfs_wait(void)
 }
 EXPORT_SYMBOL(populate_rootfs_wait);
 
-static void __init async_populate_rootfs(void)
+static void __init async_populate_rootfs(void *data, async_cookie_t cookie)
 {
 	char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
 	if (err)
@@ -628,12 +628,14 @@ static int __init populate_rootfs_early(void)
 		async_schedule_domain(async_populate_rootfs, NULL,
 						&populate_rootfs_domain);
 	}
+	return 0;
 }
 static int __init populate_rootfs(void)
 {
 	if (!rootfs_populated)
 		async_schedule_domain(async_populate_rootfs, NULL,
 						&populate_rootfs_domain);
+	return 0;
 }
 
 earlyrootfs_initcall(populate_rootfs_early);
-- 
1.7.9.5





More information about the kernel-team mailing list