dt-bindings: Bump dtschema version required to v2021.2.1
Subsystems (2)
Rob Herring
maintainerPATCH 1/2 dt-bindings: Bump dtschema version required to v2021.2.1
There's several dependencies in dtschema since v2020.8.1 we need, so let's bump the version required to v2021.2.1. Specifically, the graph.yaml schema and improved undocumented compatible check are needed.
--- Documentation/devicetree/bindings/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/Makefile +1 -1
@@ -5,7 +5,7 @@ DT_MK_SCHEMA ?= dt-mk-schema DT_SCHEMA_LINT = $(shell which yamllint) -DT_SCHEMA_MIN_VERSION = 2020.8.1 +DT_SCHEMA_MIN_VERSION = 2021.2.1 PHONY += check_dtschema_version check_dtschema_version:
Signature · 1 line
2.27.0
Rob Herring
maintainerPATCH 2/2 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
--- Documentation/devicetree/bindings/Makefile | 3 +++ scripts/Makefile.lib | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/Makefile +3 -0
@@ -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)
scripts/Makefile.lib +2 -1
@@ -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)
Signature · 1 line
2.27.0
Re: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks
Hi Rob,
Quoted 15 lines · Rob Herring
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:
Quoted 7 lines
make DT_CHECKER_FLAGS=-m
dt_binding_checkCc Maxime Ripard <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Michal Marek <[email protected]>Signed-off-by Rob Herring <[email protected]>
Thanks for your patch!
This causes lots of warning when using DT_SCHEMA_FILES, as all compatible values in bindings not specified with DT_SCHEMA_FILES become unknown.
Perhaps this should be disabled automatically when DT_SCHEMA_FILES is specified?
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Rob Herring
maintainerRe: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks
Quoted 27 lines · Geert Uytterhoeven
Hi Rob,
Quoted 15 lines · Rob Herring
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:
Quoted 7 lines
make DT_CHECKER_FLAGS=-m
dt_binding_checkCc Maxime Ripard <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Michal Marek <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 8 lines
Thanks for your patch!
This causes lots of warning when using
DT_SCHEMA_FILES, as all compatible values in bindings not specified withDT_SCHEMA_FILESbecome unknown.Perhaps this should be disabled automatically when
DT_SCHEMA_FILESis specified?
Indeed. I'll fix it up like this:
index 90b095c60f79..ad6938468c11 100644
scripts/Makefile.lib +1 -1
@@ -360,7 +360,7 @@ $(overlay-y): FORCE $(call multi_depend, $(overlay-y), .dtb, -dtbs) DT_CHECKER ?= dt-validate -DT_CHECKER_FLAGS ?= -m +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
Rob
Re: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks
Hi Rob,
Quoted 47 lines · Rob Herring
Quoted 24 lines · Geert Uytterhoeven
Quoted 15 lines · Rob Herring
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:
Quoted 7 lines
make DT_CHECKER_FLAGS=-m
dt_binding_checkCc Maxime Ripard <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Michal Marek <[email protected]>Signed-off-by Rob Herring <[email protected]>Quoted 8 lines
Thanks for your patch!
This causes lots of warning when using
DT_SCHEMA_FILES, as all compatible values in bindings not specified withDT_SCHEMA_FILESbecome unknown.Perhaps this should be disabled automatically when
DT_SCHEMA_FILESis specified?Indeed. I'll fix it up like this:
index
90b095c60f79..ad6938468c11100644scripts/Makefile.lib +1
-1@@ -360,7 +360,7 @@ $(overlay-y): FORCE $(call multi_depend, $(overlay-y), .dtb, -dtbs) DT_CHECKER ?= dt-validate -DT_CHECKER_FLAGS ?= -m +DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),,-m) DT_BINDING_DIR := Documentation/devicetree/bindings # DT_TMP_SCHEMA may be overridden from
Quoted 2 lines
Documentation/devicetree/bindings/Makefile
DT_TMP_SCHEMA?= $(objtree)/$(DT_BINDING_DIR)/processed-schema.json
Thanks, works like a charm!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds