Patchwork UBUNTU: SAUCE: async_populate_rootfs: fix build warnings

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date May 22, 2012, 6:23 p.m.
Message ID <1337710982-7439-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/160714/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - May 22, 2012, 6:23 p.m.
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@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.
Stefan Bader - May 23, 2012, 9:01 a.m.
On 22.05.2012 20:23, Herton Ronaldo Krzesinski wrote:
> 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@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.
> 
It feels like it should be SRU'ed with a report. Even though it probably is
related to boot speed changes not being upstream. But its in the generic domain
and spans a few releases.

Changes look good. ACK.

-Stefan
> 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);
Herton Ronaldo Krzesinski - May 23, 2012, 1:20 p.m.
On Wed, May 23, 2012 at 11:01:35AM +0200, Stefan Bader wrote:
> On 22.05.2012 20:23, Herton Ronaldo Krzesinski wrote:
> > 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@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.
> > 
> It feels like it should be SRU'ed with a report. Even though it probably is
> related to boot speed changes not being upstream. But its in the generic domain
> and spans a few releases.
> 
> Changes look good. ACK.

Bug report opened: http://bugs.launchpad.net/bugs/1003417

Just needs a BugLink in the patch when applying.

> 
> -Stefan
> > 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);
> 
>
Tim Gardner - May 23, 2012, 4:08 p.m.
Applied to Lucid through Quantal.

Patch

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);