From: Nicolas Schier <nsc@kernel.org>
To: Daniel Golle <daniel@makrotopia.org>
Cc: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Saravana Kannan" <saravanak@kernel.org>,
"Ping-Ke Shih" <pkshih@realtek.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"David Sterba" <dsterba@suse.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Hariharan Basuthkar" <quic_hbasuthk@quicinc.com>,
"Jeff Hugo" <jeff.hugo@oss.qualcomm.com>,
"Filipe Manana" <fdmanana@suse.com>,
"Bitterblue Smith" <rtl8821cerfe2@gmail.com>,
"Wei Yang" <richard.weiyang@gmail.com>,
"Takashi Iwai" <tiwai@suse.de>,
"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
"Chih-Kang Chang" <gary.chang@realtek.com>,
"David Lechner" <dlechner@baylibre.com>,
"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Tamir Duberstein" <tamird@kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>,
"Pagadala Yesu Anjaneyulu" <pagadala.yesu.anjaneyulu@intel.com>,
"Bartosz Golaszewski" <brgl@kernel.org>,
"Jorge Ramirez-Ortiz" <jorge.ramirez@oss.qualcomm.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Guenter Roeck" <linux@roeck-us.net>,
"Aleksander Jan Bajkowski" <olek2@wp.pl>,
"Boris Burkov" <boris@bur.io>,
"Blake Jones" <blakejones@google.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v5 3/4] dt-bindings: wire style checker into dt_binding_check
Date: Sat, 13 Jun 2026 11:58:03 +0200 [thread overview]
Message-ID: <ai0pqz9904tzrDGl@levanger> (raw)
In-Reply-To: <a14fdbded0acdc4fef1c1278100f2f4c6a93a488.1779908995.git.daniel@makrotopia.org>
On Wed, May 27, 2026 at 08:32:26PM +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>
> ---
> v5:
> - no change; depends on the new jobserver-exec fix in 2/4 so
> style failures stay visible instead of being cached
>
> v4:
> - build the @argfile with f=$(mktemp) and remove it with rm -f
> (matching cmd_mk_schema), instead of Kbuild's $(tmp-target)
> which leaves a stale .tmp_.dt-style.checked in the build tree
>
> v3:
> - use Kbuild's $(tmp-target) instead of mktemp so build output
> stays inside the build folder (Nathan)
> - collapse the conditional cleanup tail into the familiar
> "&& touch $@ || true" pattern, matching cmd_chk_bindings;
> keeps future warnings non-fatal (Rob, Nathan)
> - retained the explicit $(PYTHON3) prefix (Rob asked why it
> differs from the rest of this Makefile): per
> Documentation/kbuild/makefiles.rst "Script invocation",
> in-tree scripts should be called through their interpreter so
> the executable bit and shebang are not relied on and the
> user's $(PYTHON3) override is respected. The neighbouring
> recipes invoke their Python helpers directly because those
> come from external packages (dtschema's dt-extract-*,
> dt-check-compatible, dt-doc-validate), which is the case Rob
> asked about and which sits outside that rule.
>
> v2:
> - dropped xargs -n200 -P$(nproc) sharding; single Python invocation
> with file list via @argfile
> - dropped `|| true`: relaxed mode is zero-output today
> - wrapped under scripts/jobserver-exec so worker count follows the
> make jobserver
>
> Documentation/devicetree/bindings/Makefile | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> index 7b668f7fd400..00149e824261 100644
> --- a/Documentation/devicetree/bindings/Makefile
> +++ b/Documentation/devicetree/bindings/Makefile
> @@ -46,6 +46,18 @@ 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 \
> + && touch $@ || true; rm -f $$f
As usage of $(mktemp) requires an unconditional 'rm -f $$f', too, I'd
like to repeat Nathans suggestion to use Kbuild's $(tmp-target) instead.
The rationale, as Nathan wrote, is to keep generated files within the
build tree.
--
Nicolas
next prev parent reply other threads:[~2026-06-13 10:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 19:31 [PATCH v5 0/4] dt-bindings: automated coding style check for DTS examples Daniel Golle
2026-05-27 19:32 ` [PATCH v5 1/4] dt-bindings: add DTS style checker Daniel Golle
2026-05-27 19:46 ` sashiko-bot
2026-06-09 16:19 ` Krzysztof Kozlowski
2026-05-27 19:32 ` [PATCH v5 2/4] scripts/jobserver-exec: propagate child exit status Daniel Golle
2026-06-09 17:08 ` Krzysztof Kozlowski
2026-06-13 17:39 ` Nicolas Schier
2026-05-27 19:32 ` [PATCH v5 3/4] dt-bindings: wire style checker into dt_binding_check Daniel Golle
2026-05-27 20:28 ` sashiko-bot
2026-06-13 9:58 ` Nicolas Schier [this message]
2026-05-27 19:32 ` [PATCH v5 4/4] dt-bindings: add self-test fixtures for style checker Daniel Golle
2026-06-10 18:38 ` [PATCH v5 0/4] dt-bindings: automated coding style check for DTS examples 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=ai0pqz9904tzrDGl@levanger \
--to=nsc@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=aurabindo.pillai@amd.com \
--cc=blakejones@google.com \
--cc=boris@bur.io \
--cc=brgl@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@makrotopia.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=dsterba@suse.com \
--cc=fdmanana@suse.com \
--cc=gary.chang@realtek.com \
--cc=gary@garyguo.net \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=jorge.ramirez@oss.qualcomm.com \
--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=mchehab+huawei@kernel.org \
--cc=nathan@kernel.org \
--cc=ojeda@kernel.org \
--cc=olek2@wp.pl \
--cc=pagadala.yesu.anjaneyulu@intel.com \
--cc=pkshih@realtek.com \
--cc=quic_hbasuthk@quicinc.com \
--cc=richard.weiyang@gmail.com \
--cc=robh@kernel.org \
--cc=rtl8821cerfe2@gmail.com \
--cc=saravanak@kernel.org \
--cc=tamird@kernel.org \
--cc=tiwai@suse.de \
/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.