"strl$1 is preferred over strn$1 because it always produces a nul-terminated string\n" . $herecurr);
}
- # use defconfig to manage CONFIG_CMD options
- if ($line =~ /\+\s*#\s*(define|undef)\s+(CONFIG_CMD\w*)\b/) {
- ERROR("DEFINE_CONFIG_CMD",
- "All commands are managed by Kconfig\n" . $herecurr);
+ # use Kconfig for all CONFIG symbols
+ if ($line =~ /\+\s*#\s*(define|undef)\s+(CONFIG_\w*)\b/) {
+ ERROR("DEFINE_CONFIG_SYM",
+ "All CONFIG symbols are managed by Kconfig\n" . $herecurr);
}
# Don't put common.h and dm.h in header files
"""Test for enabling/disabling commands using preprocesor"""
pm = PatchMaker()
pm.add_line('common/main.c', '#undef CONFIG_CMD_WHICH')
- self.check_single_message(pm, 'DEFINE_CONFIG_CMD', 'error')
+ self.check_single_message(pm, 'DEFINE_CONFIG_SYM', 'error')
def test_barred_include_in_hdr(self):
"""Test for using a barred include in a header file"""