check_compliance: allow _MODULE variant of Kconfig options
Since b53a792ff0
Zephyr has the ability to define tristate Kconfig
options. When a tristate option FOO is selected as a "module", this
results in autoconf.h defining CONFIG_FOO_MODULE, not CONFIG_FOO.
This patch allows the check_compliance script to also accept references
to a Kconfig symbol ending in _MODULE if the prefix is defined.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
parent
88881257ab
commit
38b0460de3
1 changed files with 2 additions and 1 deletions
|
@ -801,7 +801,8 @@ Missing SoC names or CONFIG_SOC vs soc.yml out of sync:
|
|||
for sym_name in re.findall(regex, line):
|
||||
sym_name = sym_name[7:] # Strip CONFIG_
|
||||
if sym_name not in defined_syms and \
|
||||
sym_name not in self.UNDEF_KCONFIG_ALLOWLIST:
|
||||
sym_name not in self.UNDEF_KCONFIG_ALLOWLIST and \
|
||||
not (sym_name.endswith("_MODULE") and sym_name[:-7] in defined_syms):
|
||||
|
||||
undef_to_locs[sym_name].append(f"{path}:{lineno}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue