From: Rob Herring <robh@kernel.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: "Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nsc@kernel.org>,
"Saravana Kannan" <saravanak@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Tamir Duberstein" <tamird@kernel.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Guenter Roeck" <linux@roeck-us.net>,
"Aleksander Jan Bajkowski" <olek2@wp.pl>,
"Test User" <test@example.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: wire style checker into dt_binding_check
Date: Wed, 6 May 2026 13:44:47 -0500 [thread overview]
Message-ID: <20260506184447.GA2816439-robh@kernel.org> (raw)
In-Reply-To: <ed254ed45f19f37a7e7933a33f2f00195d8e5f20.1777471439.git.daniel@makrotopia.org>
On Wed, Apr 29, 2026 at 03:21:33PM +0100, Daniel Golle wrote:
> Run dt-check-style as part of dt_binding_check_one. The recipe wraps
> the tool with scripts/jobserver-exec so worker count follows the GNU
> make jobserver -- `make -j N dt_binding_check` constrains the checker
> to N workers rather than spawning one per CPU.
>
> Default mode (relaxed) is zero-violation on the current tree, so this
> does not introduce new warnings into make dt_binding_check. Stricter
> rules are available via --mode=strict (eg. for use by checkpatch.pl in
> a future series).
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> Changes since v1:
> - dropped xargs -n200 -P$(nproc) sharding; single Python invocation
> with file list via @argfile
> - dropped `|| true`: relaxed mode is zero-output today
Just to make sure, when there is a warning added, we don't want to error
out the build. Because they will sneak in.
> - wrapped under scripts/jobserver-exec so worker count follows the
> make jobserver
>
> Documentation/devicetree/bindings/Makefile | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> index 7b668f7fd400..35ddd0b7a349 100644
> --- a/Documentation/devicetree/bindings/Makefile
> +++ b/Documentation/devicetree/bindings/Makefile
> @@ -46,6 +46,19 @@ quiet_cmd_chk_bindings = CHKDT $(src)
> xargs -n200 -P$$(nproc) $(DT_DOC_CHECKER) -u $(src)) \
> && touch $@ || true
>
> +DT_CHK_STYLE = $(srctree)/scripts/dtc/dt-check-style
> +
> +# Feed the file list to the checker via @argfile in a single Python
> +# process so the ruamel.yaml import is paid once. scripts/jobserver-exec
> +# claims slots from the GNU make jobserver and exposes the count via
> +# $PARALLELISM, which dt-check-style picks up to size its worker pool.
> +quiet_cmd_chk_style = STYLE $(src)
> + cmd_chk_style = f=$$(mktemp) && $(find_cmd) > $$f && \
> + $(PYTHON3) $(srctree)/scripts/jobserver-exec \
> + $(PYTHON3) $(DT_CHK_STYLE) @$$f; \
What's the reason to run via PYTHON3 vs. running dt-check-style
directly? It's just different from the rest of this makefile.
> + r=$$?; rm -f $$f; \
> + if [ $$r -eq 0 ]; then touch $@; else exit $$r; fi
> +
> quiet_cmd_mk_schema = SCHEMA $@
> cmd_mk_schema = f=$$(mktemp) ; \
> $(find_all_cmd) > $$f ; \
> @@ -62,13 +75,16 @@ override DTC_FLAGS := \
> $(obj)/processed-schema.json: $(DT_DOCS) check_dtschema_version FORCE
> $(call if_changed,mk_schema)
>
> -targets += .dt-binding.checked .yamllint.checked
> +targets += .dt-binding.checked .yamllint.checked .dt-style.checked
> $(obj)/.yamllint.checked: $(DT_DOCS) $(src)/.yamllint FORCE
> $(if $(DT_SCHEMA_LINT),$(call if_changed,yamllint),)
>
> $(obj)/.dt-binding.checked: $(DT_DOCS) FORCE
> $(call if_changed,chk_bindings)
>
> +$(obj)/.dt-style.checked: $(DT_DOCS) FORCE
> + $(call if_changed,chk_style)
> +
> always-y += processed-schema.json
> targets += $(patsubst $(obj)/%,%, $(CHK_DT_EXAMPLES))
> targets += $(patsubst $(obj)/%.dtb,%.dts, $(CHK_DT_EXAMPLES))
> @@ -82,7 +98,7 @@ dt_compatible_check: $(obj)/processed-schema.json
> $(Q)$(srctree)/scripts/dtc/dt-extract-compatibles $(srctree) | xargs dt-check-compatible -v -s $<
>
> PHONY += dt_binding_check_one
> -dt_binding_check_one: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked
> +dt_binding_check_one: $(obj)/.dt-binding.checked $(obj)/.yamllint.checked $(obj)/.dt-style.checked
>
> PHONY += dt_binding_check
> dt_binding_check: dt_binding_check_one $(CHK_DT_EXAMPLES)
> --
> 2.54.0
next prev parent reply other threads:[~2026-05-06 18:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 14:21 [PATCH v2 0/3] dt-bindings: automated coding style check for DTS examples Daniel Golle
2026-04-29 14:21 ` [PATCH v2 1/3] dt-bindings: add DTS style checker Daniel Golle
2026-05-06 18:33 ` Rob Herring
2026-04-29 14:21 ` [PATCH v2 2/3] dt-bindings: wire style checker into dt_binding_check Daniel Golle
2026-04-30 23:13 ` Nathan Chancellor
2026-05-06 18:44 ` Rob Herring [this message]
2026-04-29 14:21 ` [PATCH v2 3/3] dt-bindings: add self-test fixtures for style checker Daniel Golle
2026-05-06 18:36 ` Rob Herring
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=20260506184447.GA2816439-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=linux@weissschuh.net \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=olek2@wp.pl \
--cc=rostedt@goodmis.org \
--cc=saravanak@kernel.org \
--cc=tamird@kernel.org \
--cc=test@example.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox