Re: kernel coding style for if ... else which cross #ifdef

From: H. Peter Anvin
Date: Sat May 24 2008 - 14:09:36 EST


Sam Ravnborg wrote:
I don't think we want to use "1 or 2"... I suspect we want to use the same booleans we currently have.
I'm a bit dense (or I need more coffe - it's morning here).
What "same booleans"?

Sorry, we already have CONFIG_FOO (meaning =y) and CONFIG_FOO_MODULE (meaning =m). This seems to work well and will generally do the right thing.

If we had CFG_FOO=2 for the case of FOO=n then the clean use of:

if (CFG_FOO && blah)...

... wouldn't work as nicely.

I would suggest CFG_* instead of CONFIG_* for the new set.
Agreed.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/