From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 07/10] dtc: dt-check-style: Call _strip_strings_and_comments() only once
Date: Wed, 26 Aug 2026 10:31:58 +0000 [thread overview]
Message-ID: <20260826103158.D89201F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260826-n-dts-style-checker-continued-v5-7-fdd16ca6e771@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Removal of `.strip()` in check_value_whitespace introduces false positive warnings for extra whitespace.
--
commit f4faff4b08497467646cdf648bcdf86e75cfd546
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Call _strip_strings_and_comments() only once
More than one rule evaluates pure code - stripped from comments and
indentation - thus store this pure code in DtsLine class for
better performance.
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index a1034f6b9cafd..da7edd5ea079d 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -860,9 +860,9 @@ def check_value_whitespace(ctx):
> for dl in ctx.lines:
> if dl.linetype != LineType.PROPERTY:
> continue
> - segs = [_strip_strings_and_comments(dl.raw).strip()]
> + segs = [dl.code]
> for cont in dl.continuations:
> - segs.append(_strip_strings_and_comments(cont.stripped).strip())
> + segs.append(cont.code)
[Severity: Medium]
Does removing .strip() here introduce false positive warnings for extra
whitespace?
When an inline block comment is removed from a continuation line (for example
"/* comment */ 1>;"), the leading space is left behind. Without .strip(),
this space is preserved when the property segments are concatenated. This
could falsely trigger the strict mode regex match for extra whitespace inside
brackets.
> text = ''
> for s in segs:
> if not s:
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260826-n-dts-style-checker-continued-v5-0-fdd16ca6e771@oss.qualcomm.com?part=7
next prev parent reply other threads:[~2026-08-26 10:31 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
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 [this message]
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=20260826103158.D89201F000E9@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.