From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/3] dtc: dt-check-style: Consistently pass same content as stripped line
Date: Sun, 06 Sep 2026 18:13:31 +0000 [thread overview]
Message-ID: <20260906181332.280591F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260906180437.166760-6-krzysztof.kozlowski@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Passing `stripped` instead of `code` to `DtsLine` for continuation lines breaks code parsing when comments contain quotes, causing false positive style warnings.
--
commit b0e5f002675043b5c126935e8c52f79036f0359b
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Consistently pass same content as stripped line
This commit updates the dt-check-style script to pass the stripped string
instead of code to the DtsLine constructor for continuation lines. This is
intended to make the arguments consistent with other DtsLine constructor calls.
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index 36e5b5db5e14c..49ced18895583 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
> @@ -203,7 +203,7 @@ def classify_lines(text):
> in_block_comment = True
>
> if not prev_complete:
> - dl = DtsLine(i, raw, LineType.CONTINUATION, depth, indent_str, code)
> + dl = DtsLine(i, raw, LineType.CONTINUATION, depth, indent_str, stripped)
[Severity: Medium]
Does passing stripped instead of code break parsing when comments contain
quotes?
By passing stripped (which still contains comments) instead of the properly
pre-parsed code, DtsLine.__init__ falls back to its regex-based
_strip_strings_and_comments() method which incorrectly consumes valid code
if a quote appears within a comment.
This can cause the dt-check-style script to generate false positive style
warnings on valid DTS files when a continuation line contains a comment with
an unescaped double quote (e.g., some_prop = "a", /* comment " */ "b";).
> out.append(dl)
> prev_complete = (code.endswith(';') or
> code.endswith('{') or
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260906180437.166760-4-krzysztof.kozlowski@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-09-06 18:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 18:04 [PATCH 1/3] dtc: dt-check-style: Right strip whitespaces, leftovers before comments Krzysztof Kozlowski
2026-09-06 18:04 ` [PATCH 2/3] dtc: dt-check-style: Properly detect comments in multi-line properties Krzysztof Kozlowski
2026-09-06 18:15 ` sashiko-bot
2026-09-09 7:59 ` Krzysztof Kozlowski
2026-09-06 18:04 ` [PATCH 3/3] dtc: dt-check-style: Consistently pass same content as stripped line Krzysztof Kozlowski
2026-09-06 18:13 ` sashiko-bot [this message]
2026-09-09 8:33 ` 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=20260906181332.280591F00A3A@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.