Kconfig symbols: coding style: naming convention in Make and CPP syntax

From: Valentin Rothberg
Date: Mon Jul 06 2015 - 04:32:48 EST


Hi,

Kconfig symbols in Make and CPP syntax are prefixed with 'CONFIG_' and
suffixed with '_MODULE' in case of modules. Static analysis tools
like scripts/checkkconfigsymbols.py, the Undertaker tools [1] or
Paul's perl monster rely on the assumption that 'CONFIG_' prefixed
symbols must be defined somewhere in a Kconfig file. Sadly, this
naming convention is not explicitly written down in any documentation
file. Hence there are more than 250 cases in the source where
'CONFIG_' prefixed symbols are defined outside Kconfig (e.g., #define
CONFIG_IRQ_REQ [..] in drivers/pcmcia/cs_internal.h). To give an
example, 65 of such cases are newly introduced with the gigantic AMD
driver mentioned in Linus' v4.2-rc1 log.

Since the naming convention is not made explicit, it can be hard to
convince people of not using the 'CONFIG_' prefix. So here is my
question/proposal: Do you agree on making the 'CONFIG_' naming
convention explicit (e.g., in Documentation/CodingStyle)? It would
simplify the life of people who check git trees for Kconfig issues and
report them, because a pointer to an explicit rule is more convincing
than explaining how Kbuild transforms a .config file.

Kind regards,
Valentin

[1] https://undertaker.cs.fau.de/
--
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/