From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 6/6] dtc: dt-check-style: Handle properly DTC-style includes
Date: Mon, 06 Jul 2026 16:13:25 +0000 [thread overview]
Message-ID: <20260706161325.B76211F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260706-dts-style-checker-v3-6-03ffacff9226@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The regular expression `re_dtc_directive` fails to match `/include/` directives that omit trailing whitespace before the quoted filename, leaving the original false-positive indent warnings unfixed for such cases.
--
commit d544e9f7ca01b23db8faca49c7b36dba2a77d032
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Handle properly DTC-style includes
This commit updates dt-check-style to properly handle DTC-style include
directives to avoid false positive indent warnings.
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index 3c1aa9e28347e..b8ba6dbee86d5 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
> @@ -49,6 +49,9 @@ re_cpp_directive = re.compile(
> r'^#\s*(include|define|undef|ifdef|ifndef|if|else|elif|endif|'
> r'pragma|error|warning)\b')
>
> +re_dtc_directive = re.compile(
> + r'^/(dts-v1|include)/[;\s]')
[Severity: Low]
Does this regular expression miss valid /include/ directives that omit trailing
whitespace before the quoted filename?
If a .dts file contains a directive without a space, such as
/include/"file.dtsi", it is not matched by re_dtc_directive because it lacks a
space or semicolon. This could cause the script to treat it as an incomplete
property, bypassing the brace depth tracking and triggering the exact false
positive this patch aims to fix.
Should the character class be expanded to include double quotes, such as
[;\s"]?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260706-dts-style-checker-v3-0-03ffacff9226@oss.qualcomm.com?part=6
next prev parent reply other threads:[~2026-07-06 16:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 15:53 [PATCH v3 0/6] dtc: dt-check-style: Improvement after using on DTS Krzysztof Kozlowski
2026-07-06 15:53 ` [PATCH v3 1/6] dtc: dt-check-style: Narrow disallowing of tab in DTS only to YAML Krzysztof Kozlowski
2026-07-06 15:59 ` sashiko-bot
2026-07-06 16:00 ` Krzysztof Kozlowski
2026-07-06 15:53 ` [PATCH v3 2/6] dtc: dt-check-style: Allow space-aligning indentation in DTS Krzysztof Kozlowski
2026-07-06 15:53 ` [PATCH v3 3/6] dtc: dt-check-style: Rework handling YAML/DTS in rules Krzysztof Kozlowski
2026-07-06 15:53 ` [PATCH v3 4/6] dtc: dt-check-style: Expect first device_type Krzysztof Kozlowski
2026-07-06 16:07 ` sashiko-bot
2026-07-06 16:09 ` Krzysztof Kozlowski
2026-07-06 15:53 ` [PATCH v3 5/6] dtc: dt-check-style: Do not sort top-level nodes in DTS by unit address Krzysztof Kozlowski
2026-07-06 16:05 ` sashiko-bot
2026-07-06 15:53 ` [PATCH v3 6/6] dtc: dt-check-style: Handle properly DTC-style includes Krzysztof Kozlowski
2026-07-06 16:13 ` sashiko-bot [this message]
2026-07-06 16:20 ` 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=20260706161325.B76211F000E9@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox