[PATCH] Mark prop unused in early_init_dt_scan_chosen().

Michael Ellerman michael at ellerman.id.au
Wed May 9 09:56:34 EST 2007


On Tue, 2007-05-08 at 12:14 -0500, Scott Wood wrote:
> The prop variable is only referenced when initrd support is
> turned on.
> 
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> ---
>  arch/powerpc/kernel/prom.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index caef555..6705459 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -720,7 +720,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
>  					    const char *uname, int depth, void *data)
>  {
>  	unsigned long *lprop;
> -	u32 *prop;
> +	u32 __attribute__((unused)) *prop;
>  	unsigned long l;
>  	char *p;

Hi Scott,

Let's be honest, this is a hack. I think it'd be cleaner to pull the
initrd logic out into a separate function.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070509/bdaccbf1/attachment.pgp>


More information about the Linuxppc-dev mailing list