* [PATCH 1/2] dt-bindings: Bump dtschema version required to v2021.2.1 @ 2021-03-11 23:36 Rob Herring 2021-03-11 23:36 ` [PATCH 2/2] kbuild: Enable DT undocumented compatible checks Rob Herring 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2021-03-11 23:36 UTC (permalink / raw) To: devicetree Cc: linux-kernel, linux-kbuild, Maxime Ripard, Masahiro Yamada, Michal Marek 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. Signed-off-by: Rob Herring <robh@kernel.org> --- Documentation/devicetree/bindings/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile index 780e5618ec0a..81f0b3294c64 100644 --- a/Documentation/devicetree/bindings/Makefile +++ b/Documentation/devicetree/bindings/Makefile @@ -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: -- 2.27.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] kbuild: Enable DT undocumented compatible checks 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 2021-03-16 13:55 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2021-03-11 23:36 UTC (permalink / raw) To: devicetree Cc: linux-kernel, linux-kbuild, Maxime Ripard, Masahiro Yamada, Michal Marek 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks 2021-03-11 23:36 ` [PATCH 2/2] kbuild: Enable DT undocumented compatible checks Rob Herring @ 2021-03-16 13:55 ` Geert Uytterhoeven 2021-03-16 14:28 ` Rob Herring 0 siblings, 1 reply; 5+ messages in thread From: Geert Uytterhoeven @ 2021-03-16 13:55 UTC (permalink / raw) To: Rob Herring Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Linux Kernel Mailing List, linux-kbuild, Maxime Ripard, Masahiro Yamada, Michal Marek Hi Rob, On Fri, Mar 12, 2021 at 12:38 AM Rob Herring <robh@kernel.org> wrote: > 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> 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 -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks 2021-03-16 13:55 ` Geert Uytterhoeven @ 2021-03-16 14:28 ` Rob Herring 2021-03-16 14:34 ` Geert Uytterhoeven 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2021-03-16 14:28 UTC (permalink / raw) To: Geert Uytterhoeven Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Linux Kernel Mailing List, linux-kbuild, Maxime Ripard, Masahiro Yamada, Michal Marek On Tue, Mar 16, 2021 at 7:55 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Rob, > > On Fri, Mar 12, 2021 at 12:38 AM Rob Herring <robh@kernel.org> wrote: > > 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> > > 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? Indeed. I'll fix it up like this: index 90b095c60f79..ad6938468c11 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: Enable DT undocumented compatible checks 2021-03-16 14:28 ` Rob Herring @ 2021-03-16 14:34 ` Geert Uytterhoeven 0 siblings, 0 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2021-03-16 14:34 UTC (permalink / raw) To: Rob Herring Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Linux Kernel Mailing List, linux-kbuild, Maxime Ripard, Masahiro Yamada, Michal Marek Hi Rob, On Tue, Mar 16, 2021 at 3:28 PM Rob Herring <robh@kernel.org> wrote: > On Tue, Mar 16, 2021 at 7:55 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > On Fri, Mar 12, 2021 at 12:38 AM Rob Herring <robh@kernel.org> wrote: > > > 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> > > > > 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? > > Indeed. I'll fix it up like this: > > index 90b095c60f79..ad6938468c11 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -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 Thanks, works like a charm! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-16 14:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 ` [PATCH 2/2] kbuild: Enable DT undocumented compatible checks Rob Herring 2021-03-16 13:55 ` Geert Uytterhoeven 2021-03-16 14:28 ` Rob Herring 2021-03-16 14:34 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).