From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/9] dtc: dt-check-style: Handle root node in overlays
Date: Sun, 26 Jul 2026 16:00:57 +0000 [thread overview]
Message-ID: <20260726160058.229B71F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260726-n-dts-style-checker-continued-v1-3-b05b8f897670@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The patch introduces a regression for valid root nodes (e.g., labeled or with extra spacing) and fails to change behavior for overlay root nodes, rendering the intended fix ineffective and actively harmful.
- [Medium] The patch claims to fix "property order" false positives but exclusively modifies "child name order" logic, leaving property order checking unchanged.
--
--- Patch [3]: [PATCH 3/9] dtc: dt-check-style: Handle root node in overlays ---
commit 3ffd10d90b05e9e479a121a83377b237c94b4b24
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Handle root node in overlays
This patch modifies the device tree style checker to detect root nodes in
overlays by matching specific node open strings. It stores this state in an
is_root attribute and uses it when checking child name order.
> This fixes false positives for property order for root nodes in overlays.
[Severity: Medium]
The commit message states this patch fixes "property order" false
positives, but the code exclusively modifies the child name order logic in
check_child_name_order(). Is check_property_order() supposed to use the new
is_root flag as well?
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -228,7 +229,10 @@ def classify_lines(text):
> continue
>
> if code.endswith('{'):
> - dl = DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, code)
> + is_root = False
> + if code == '&{/} {' or code == '/ {':
[Severity: Medium]
Will this exact string match handle valid alternative spacings or labels?
For example, if the code contains a label like "label: / {" or extra
whitespace like "/ {", it seems this would fail to set is_root to True.
> + is_root = True
> + dl = DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, code, is_root=is_root)
> parse_node_header(dl)
> out.append(dl)
> depth += 1
[ ... ]
> @@ -550,7 +554,9 @@ def check_child_name_order(ctx):
> for c in children:
> if c.node_addr is not None:
> continue
> - if c.node_name in (None, '/'):
> + if c.node_name is None:
> + continue
> + if c.is_root:
[Severity: Medium]
Since this replaces the previous check for c.node_name in (None, '/'), could
it cause valid root nodes that were missed by the exact string match in
classify_lines() to incorrectly bypass this skip logic and trigger false
positives?
> continue
> if c.ref_name is not None:
> continue
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260726-n-dts-style-checker-continued-v1-0-b05b8f897670@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-07-26 16:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 15:47 [PATCH 0/9] dtc: dt-check-style: Improvements for false positives Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 1/9] dtc: dt-check-style: Add missing /dts-v1/ to few test cases Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 2/9] dtc: dt-check-style: Simplify setting depth of DtsLine Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 3/9] dtc: dt-check-style: Handle root node in overlays Krzysztof Kozlowski
2026-07-26 16:00 ` sashiko-bot [this message]
2026-07-26 15:47 ` [PATCH 4/9] dtc: dt-check-style: Handle sorting of top-level nodes and properties Krzysztof Kozlowski
2026-07-26 15:57 ` sashiko-bot
2026-07-26 15:47 ` [PATCH 5/9] dtc: dt-check-style: Drop stray backslash before quote for continuation-alignment Krzysztof Kozlowski
2026-07-26 15:47 ` [PATCH 6/9] dtc: dt-check-style: Fix alignment of values in continued property lines Krzysztof Kozlowski
2026-07-26 15:56 ` sashiko-bot
2026-07-26 15:47 ` [PATCH 7/9] dtc: dt-check-style: Consistently call 'kind' as 'file_type' Krzysztof Kozlowski
2026-07-26 15:53 ` sashiko-bot
2026-07-26 15:47 ` [PATCH 8/9] dtc: dt-check-style: Introduce 'stricter' mode Krzysztof Kozlowski
2026-07-26 15:54 ` sashiko-bot
2026-07-26 15:47 ` [PATCH 9/9] MAINTAINERS: dt-bindings: Include dt-check-style in DT binding entry Krzysztof Kozlowski
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=20260726160058.229B71F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--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 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.