Dear Graeme Russ,
In message <[email protected]> you wrote:
> Planned future ports requires more granularity for some options
...
> +#if defined(CONFIG_CMD_NET)
> char *s;
> +#endif
> +#ifndef CONFIG_SYS_NO_FLASH
> ulong size;
> +#endif
...
> +#ifndef CONFIG_SYS_NO_FLASH
> /* configure available FLASH banks */
> size = flash_init();
> display_flash_config(size);
> show_boot_progress(0x24);
> +#endif
The more often I see this, the less I like it. In a number of recent
cleanup patches I tried to avoid such multiple #ifdefs by using local
blocks, like that:
#ifndef CONFIG_SYS_NO_FLASH
{
ulong size;
/* configure available FLASH banks */
size = flash_init();
display_flash_config(size);
show_boot_progress(0x24);
}
#endif
This is not exactly nice either, but at least keeps the related
declarations and code together, and reduces the number of #ifdef's.
Have a look at it and feel free to use this method if you like it,
or just ignore it.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
They say a little knowledge is a dangerous thing, but it is not one
half so bad as a lot of ignorance. - Terry Pratchett, _Equal Rites_
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot