From: Rich Ireland Date: Mon, 04 Nov 2002 16:16:23 -0700 Subject: [ARMboot-users] Re: [U-Boot-Users] [PATCH] update for CSB226 References: <20021104223540.5E0C51015F@denx.denx.de> Message-ID: <3DC6FFC7.9010601@idahotech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > > 2) Many of these #ifdef's are used to conditionammy define variables, > or initializers, where an if() cannot be used, so we would have to > support BOTH forms, which is actually worse. Yep, supporting both methods would be very bad. IMNSHO, #ifdef MISC_INIT_R misc_init_r(); #endif is better. But then you have to get all the board maintainers to define MISC_INIT_R properly. One could just remove all the 'board specific' defines from this and wait for the patches to arrive... ;-) Personally, I prefer to have all init functions defined for each supported board and skip all the if'def blocks all together. Either by an empty #define or an empty function. This makes everything *much* more readable. Yes, there are exceptions, but (in a perfect world) generic code shouldn't have board specific references at all. Let the linker do it's job. Just my 2/100th's of a USD. -- Rich Ireland Firmware Engineer Idaho Technology, Inc. http://www.idahotech.com/ mailto:rich.ireland at idahotech.com