[PATCH] Mark prop unused in early_init_dt_scan_chosen().

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Fri May 11 02:06:46 EST 2007


On Thu, 10 May 2007, Scott Wood wrote:
> Geert Uytterhoeven wrote:
> > On Wed, 9 May 2007, Kumar Gala wrote:
> > > On Tue, 8 May 2007, Scott Wood wrote:
> > > > -	u32 *prop;
> > > > +	u32 __attribute__((unused)) *prop;
> > > 
> > > is this the desired way to remove warnings related to CONFIG_ options?  I
> > > know in the past we'd wrap it with a #ifdef CONFIG_FOO
> 
> Granted...  in this case, it looked as if there could be potential for using
> it for other things in the future as well.  That, and the extra ifdefs are
> ugly. :-)
> 
> > Exactly my thought.
> > 
> > Another advantage of #ifdef CONFIG_FOO is that if the actual code that uses
> > it
> > goes away, we'll get a warning again. Else in the end we'll be stuck with
> > zillions of unused variables that don't cause warnings...
> 
> Again, granted -- though I'd say the primary problem in that case is functions
> that are too long to determine that by visual inspection alone.
> 
> I agree with Michael Ellerman that it'd be best to just factor the initrd
> stuff out into its own function.

Yes, Michael Ellerman's patch is an even better solution.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven at sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium



More information about the Linuxppc-dev mailing list