aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/test_checkpatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patman/test_checkpatch.py')
-rw-r--r--tools/patman/test_checkpatch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/patman/test_checkpatch.py b/tools/patman/test_checkpatch.py
index 792196e689..f71c70fb13 100644
--- a/tools/patman/test_checkpatch.py
+++ b/tools/patman/test_checkpatch.py
@@ -405,6 +405,12 @@ index 0000000..2234c87
pm.add_line('include/myfile.h', '#include <dm.h>')
self.checkSingleMessage(pm, 'BARRED_INCLUDE_IN_HDR', 'error')
+ def testConfigIsEnabledConfig(self):
+ """Test for accidental CONFIG_IS_ENABLED(CONFIG_*) calls"""
+ pm = PatchMaker()
+ pm.add_line('common/main.c', 'if (CONFIG_IS_ENABLED(CONFIG_CLK))')
+ self.checkSingleMessage(pm, 'CONFIG_IS_ENABLED_CONFIG', 'error')
+
if __name__ == "__main__":
unittest.main()