All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Maxime Ripard <mripard@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>
Subject: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks
Date: Thu, 11 Mar 2021 16:36:40 -0700	[thread overview]
Message-ID: <20210311233640.1581526-2-robh@kernel.org> (raw)
In-Reply-To: <20210311233640.1581526-1-robh@kernel.org>

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>
---
 Documentation/devicetree/bindings/Makefile | 3 +++
 scripts/Makefile.lib                       | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 81f0b3294c64..bc24ee316726 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -55,6 +55,9 @@ override DTC_FLAGS := \
 	-Wno-graph_child_address \
 	-Wno-interrupt_provider
 
+# Disable undocumented compatible checks until warning free
+override DT_CHECKER_FLAGS ?=
+
 $(obj)/processed-schema-examples.json: $(DT_DOCS) $(src)/.yamllint check_dtschema_version FORCE
 	$(call if_changed_rule,chkdt)
 
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index eee59184de64..f11fac1a8e9b 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 ?= -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)
-- 
2.27.0


  reply	other threads:[~2021-03-11 23:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 23:36 [PATCH 1/2] dt-bindings: Bump dtschema version required to v2021.2.1 Rob Herring
2021-03-11 23:36 ` Rob Herring [this message]
2021-03-16 13:55   ` [PATCH 2/2] kbuild: Enable DT undocumented compatible checks Geert Uytterhoeven
2021-03-16 14:28     ` Rob Herring
2021-03-16 14:34       ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210311233640.1581526-2-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mripard@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.