aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2021-03-11 16:36:40 -0700
committerRob Herring <robh@kernel.org>2021-03-16 09:08:29 -0600
commitc59773d204cc02cc97b4b8dc4cf87a595204cc9d (patch)
tree987dcdcbdc10a3551ab2d8dbc73e67df66da2ffc /scripts/Makefile.lib
parente2b0d9987920f3dc727e08a1bf42296be9b5d6da (diff)
downloadlinux-c59773d204cc02cc97b4b8dc4cf87a595204cc9d.tar.gz
kbuild: Enable DT undocumented compatible checks
dt-validate has an option to warn on any compatible strings which don't match any schema. The option has recently been improved to fix false positives, so let's enable the option. This is useful for tracking compatibles which are undocumented or not yet converted to DT schema. Previously, the only check of undocumented compatible strings has been an imperfect checkpatch.pl check. The option is enabled by default for 'dtbs_check'. This will add more warnings, but some platforms are down to only a handful of these warnings (good job!). There's about 100 cases in the binding examples, so the option is disabled until these are fixed. In the meantime, they can be checked with: make DT_CHECKER_FLAGS=-m dt_binding_check Cc: Maxime Ripard <mripard@kernel.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Michal Marek <michal.lkml@markovi.net> Cc: linux-kbuild@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210311233640.1581526-2-robh@kernel.org
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index eee59184de640..34e5fefa8d926 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -339,12 +339,13 @@ $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
$(call if_changed_dep,dtc)
DT_CHECKER ?= dt-validate
+DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),,-m)
DT_BINDING_DIR := Documentation/devicetree/bindings
# DT_TMP_SCHEMA may be overridden from Documentation/devicetree/bindings/Makefile
DT_TMP_SCHEMA ?= $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
quiet_cmd_dtb_check = CHECK $@
- cmd_dtb_check = $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@
+ cmd_dtb_check = $(DT_CHECKER) $(DT_CHECKER_FLAGS) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@
define rule_dtc
$(call cmd_and_fixdep,dtc)