Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Daniel Golle" <daniel@makrotopia.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/3] dt-bindings: wire style checker into dt_binding_check
Date: Fri, 22 May 2026 18:36:23 +0000	[thread overview]
Message-ID: <20260522183624.97E1F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <93923232b32423d33dc3b6632165ccc9571dea8f.1779472837.git.daniel@makrotopia.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The style checker's exit code is silently swallowed by the `jobserver-exec` wrapper, causing the Make target to falsely cache failed runs as successful.
--

commit d2626a1d6568000139a4bc557d46c27f248fcea9
Author: Daniel Golle <daniel@makrotopia.org>

dt-bindings: wire style checker into dt_binding_check

This commit adds the dt-check-style tool to the dt_binding_check_one target
to enforce relaxed style checks on the device tree bindings. It uses
scripts/jobserver-exec to constrain the worker count based on the GNU make
jobserver.

> diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
> index 7b668f7fd4007..00149e8242611 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

[Severity: Low]
Does this wrapper silently swallow the style checker's exit code?

The main() function in scripts/jobserver-exec does not appear to pass the
subprocess exit code returned by jobserver.run() to sys.exit(). Because the
script always implicitly exits with status 0, the && touch $@ command
will execute unconditionally even if the style checker detects violations and
exits with a non-zero code.

This will erroneously create the .dt-style.checked stamp file, caching the
failed check as successful and hiding warnings on subsequent runs until the
files are modified again.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1779472837.git.daniel@makrotopia.org?part=2

  reply	other threads:[~2026-05-22 18:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22 18:04 [PATCH v4 0/3] dt-bindings: automated coding style check for DTS examples Daniel Golle
2026-05-22 18:04 ` [PATCH v4 1/3] dt-bindings: add DTS style checker Daniel Golle
2026-05-22 18:17   ` sashiko-bot
2026-05-22 18:04 ` [PATCH v4 2/3] dt-bindings: wire style checker into dt_binding_check Daniel Golle
2026-05-22 18:36   ` sashiko-bot [this message]
2026-05-22 18:04 ` [PATCH v4 3/3] dt-bindings: add self-test fixtures for style checker Daniel Golle

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=20260522183624.97E1F1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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