Re: [PATCH] Mark prop unused in early_init_dt_scan_chosen().
From: Geert Uytterhoeven <hidden>
Date: 2007-05-10 16:06:47
On Thu, 10 May 2007, Scott Wood wrote:
Geert Uytterhoeven wrote:quoted
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_FOOGranted... 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. :-)quoted
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@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium