[PATCH] Mark prop unused in early_init_dt_scan_chosen().
Scott Wood
scottwood at freescale.com
Fri May 11 01:54:54 EST 2007
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.
-Scott
More information about the Linuxppc-dev
mailing list