Re: kernel coding style for if ... else which cross #ifdef
From: Jeremy Fitzhardinge
Date: Sat May 24 2008 - 17:15:48 EST
H. Peter Anvin wrote:
That's a very defeatist stance, and quite frankly bogus.
But <stamp foot> coding is *hard*.
Doing it as a flag day event is not really practical, which is why we
need a new set of symbols. However, at that point we can discourage
continuing use of the CONFIG_ symbols and deprecate them over time.
It's not like we're talking about user-space-visible interfaces here!
Well, I'm thinking more along the lines of:
1. We introduce this <whatever> mechanism
2. Hundreds of people pop out of the woodwork thinking "this looks
more fun than tweaking whitespace"
3. They produce one-hundred trillion "convert #ifdef to if()" patches
4. We have one-hundred trillion^2 followup "fix build with this
.config" patches
3 might be enough to finally drive Andrew out of the kernel business,
but 4 definitely would be.
The whole point is to try and get config-invariant build breakages, so
that we become less dependent on lots of randconfig testing. If the
definedness of the KCONFIG_ constants is still dependent on a particular
.config, then we're not really making all that much progress.
If we move to having a single unified kernel config rather than per-arch
ones (as Sam mentioned), then we can be sure of generating a complete
list of all config variables, and we can explicitly define them. But if
we don't move to that state more or less simultaneously with using
KCONFIG_ constants, then we should do it in the defeatest way so we can
make forward progress with minimal regression.
J
--
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/