All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 01/10] dtc: dt-check-style: Handle sorting of top-level nodes and properties
Date: Wed, 26 Aug 2026 10:30:31 +0000	[thread overview]
Message-ID: <20260826103032.56BD01F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260826-n-dts-style-checker-continued-v5-1-fdd16ca6e771@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Strict string equality check for root node overlays fails on variable whitespace.
--

commit f8f70e68a9d636c397e92564f4d820f3585db82c
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

dtc: dt-check-style: Handle sorting of top-level nodes and properties

Top-level DTS has two nodes with unit-addresses (memory@ and soc@) where
sorting typically prefers node name over unit address. This patch updates
the style checker to apply special sorting rules for the root node,
including placing the model property before compatible.

> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index 96deffc0d8a7c..e5f26d3e2792b 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -228,7 +230,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 re.search(r'^/\s*\{$', code):

[Severity: Medium]
Will this strict string equality check fail to identify root node overlays if
there is any variation in whitespace before the opening brace, such as
&{/}{ or &{/}  {?

If this fails to identify them as root nodes, does the script fall back to
standard node rules and incorrectly produce false positive style warnings
for root node overlays?

> +                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
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260826-n-dts-style-checker-continued-v5-0-fdd16ca6e771@oss.qualcomm.com?part=1

  reply	other threads:[~2026-08-26 10:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 10:21 [PATCH v5 00/10] dtc: dt-check-style: Improvements for false positives Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 01/10] dtc: dt-check-style: Handle sorting of top-level nodes and properties Krzysztof Kozlowski
2026-08-26 10:30   ` sashiko-bot [this message]
2026-08-26 10:39     ` Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 02/10] dtc: dt-check-style: Drop stray backslash before quote for continuation-alignment Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 03/10] dtc: dt-check-style: Fix alignment of values in continued property lines Krzysztof Kozlowski
2026-08-26 10:34   ` sashiko-bot
2026-08-26 11:10     ` Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 04/10] dtc: dt-check-style: Consistently call 'kind' as 'file_type' Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 05/10] dtc: dt-check-style: Introduce 'stricter' mode Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 06/10] dtc: dt-check-style: Replace Test User email with Rob Herring Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 07/10] dtc: dt-check-style: Call _strip_strings_and_comments() only once Krzysztof Kozlowski
2026-08-26 10:31   ` sashiko-bot
2026-08-26 10:45     ` Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 08/10] dtc: dt-check-style: Add test for trailing white-space in DTS Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 09/10] dtc: dt-check-style: Add warning for redundant white-spaces Krzysztof Kozlowski
2026-08-26 10:33   ` sashiko-bot
2026-08-26 11:12     ` Krzysztof Kozlowski
2026-08-26 10:21 ` [PATCH v5 10/10] 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=20260826103032.56BD01F000E9@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.