[coreboot] [PATCH] Make RAM check configurable via Kconfig
Uwe Hermann
uwe at hermann-uwe.de
Sat Mar 8 02:09:22 CET 2008
On Fri, Mar 07, 2008 at 03:10:27PM -0800, ron minnich wrote:
> So, I am curious.
>
> I see this:
> ram_check(0, 640 * 1024);
>
> in a file. Could I be forgiven in thinking that a ram check might be
> done? I realize this is the "linux style" but I have never
> particularly liked it.
>
> What is wrong with
> #ifdef RAMTEST
> ram_check(0, 640 * 1024);
> #endif
>
> What do people prefer? Maybe I am just out of touch.
It's mostly a matter of preference, yes. The nice thing here is that
you have an #ifdef _once_ and not in every single location where
the function is called. Looks much cleaner overall in the code.
We do similar stuff with printk btw. Depending on the loglevel a
prink(BIOS_INFO, "Hello world");
does something or does nothing. You wouldn't want to write
#if (LOGLEVEL >= x)
printk(...);
#endif
everytime you want to print a messge.
Uwe.
--
http://www.hermann-uwe.de | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
More information about the coreboot
mailing list