summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.extrawarn3
-rwxr-xr-xscripts/checkpatch.pl4
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 7d39b27d24a..f687515fc79 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -13,6 +13,9 @@
KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
+KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror
+KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y)
+
ifeq ("$(origin W)", "command line")
export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
endif
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b8eb57f38c7..f9f8891c0c4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7205,8 +7205,8 @@ sub process {
# check for IS_ENABLED() without CONFIG_<FOO> ($rawline for comments too)
if ($rawline =~ /\bIS_ENABLED\s*\(\s*(\w+)\s*\)/ && $1 !~ /^${CONFIG_}/) {
- WARN("IS_ENABLED_CONFIG",
- "IS_ENABLED($1) is normally used as IS_ENABLED(${CONFIG_}$1)\n" . $herecurr);
+ ERROR("IS_ENABLED_CONFIG",
+ "IS_ENABLED($1) must be used as IS_ENABLED(${CONFIG_}$1)\n" . $herecurr);
}
# check for #if defined CONFIG_<FOO> || defined CONFIG_<FOO>_MODULE