Re: [PATCH] Mark prop unused in early_init_dt_scan_chosen().
From: Scott Wood <hidden>
Date: 2007-05-10 15:55:01
Geert Uytterhoeven wrote:
On Wed, 9 May 2007, Kumar Gala wrote:quoted
On Tue, 8 May 2007, Scott Wood wrote:quoted
- 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