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 v3 06/11] dtc: dt-check-style: Fix alignment of values in continued property lines
Date: Mon, 03 Aug 2026 09:21:40 +0000 [thread overview]
Message-ID: <20260803092141.279881F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260803-n-dts-style-checker-continued-v3-6-6c9776928cea@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The dt-check-style continuation alignment heuristic misaligns C preprocessor macros
--
--- Patch [6]: [PATCH v3 06/11] dtc: dt-check-style: Fix alignment of values in continued property lines ---
commit 2e7f6260952152a0c0c19383e03e859b1a3c8092
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Fix alignment of values in continued property lines
This commit updates the dt-check-style script to enforce proper alignment
for continued property lines. If a continued line is part of a previous
phandle, it requires alignment to inner values rather than the opening
bracket to improve readability.
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index bdf36ba9e2744..1c67348fb5269 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -942,15 +943,20 @@ def check_continuation_alignment(ctx):
> continue
> # First '<' or '"' after '='
> rest = dl.raw[eq + 1:]
> - m = re.search(r'[<"]', rest)
> + m = re.search(r'\s*([<"])', rest)
> if not m:
> continue
> - target_col = _display_col(dl.raw[:eq + 1 + m.start()])
> + target_col = _display_col(dl.raw[:eq + 1 + m.start(1)])
> for cont in dl.continuations:
> - if _display_col(cont.indent_str) != target_col:
> + target_offset = 0
> + err_msg_explanation = 'to < or "'
> + if not re.match(r'[<"]', cont.stripped):
> + target_offset = 1
[Severity: Low]
Does this heuristic unintentionally force misalignment for C preprocessor macros
when they appear as top-level elements in comma-separated property lists?
Looking at check_continuation_alignment() in scripts/dtc/dt-check-style, if a
macro is used in a list alongside <...> elements:
clocks = <&foo>,
CLOCK_MACRO;
The macro does not start with < or ". As a result, this check treats the macro
as an inner value and applies the target_offset = 1. This would mandate an
extra column of indentation, forcing the macro to misalign from the opening <
of the previous line.
> + err_msg_explanation = 'to the value under <'
> + if _display_col(cont.indent_str) != target_col + target_offset:
> yield (cont.lineno,
> 'continuation should align to column %d '
> - '(under < or ")' % (target_col + 1))
> + '(%s)' % (target_col + target_offset + 1, err_msg_explanation))
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com?part=6
next prev parent reply other threads:[~2026-08-03 9:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 9:03 [PATCH v3 00/11] dtc: dt-check-style: Improvements for false positives Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 01/11] dtc: dt-check-style: Add missing /dts-v1/ to few test cases Krzysztof Kozlowski
2026-08-03 22:30 ` Rob Herring (Arm)
2026-08-03 9:03 ` [PATCH v3 02/11] dtc: dt-check-style: Simplify setting depth of DtsLine Krzysztof Kozlowski
2026-08-03 22:31 ` Rob Herring (Arm)
2026-08-03 9:03 ` [PATCH v3 03/11] dtc: dt-check-style: Handle root node in overlays Krzysztof Kozlowski
2026-08-03 9:18 ` sashiko-bot
2026-08-03 9:03 ` [PATCH v3 04/11] dtc: dt-check-style: Handle sorting of top-level nodes and properties Krzysztof Kozlowski
2026-08-03 9:20 ` sashiko-bot
2026-08-05 7:07 ` Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 05/11] dtc: dt-check-style: Drop stray backslash before quote for continuation-alignment Krzysztof Kozlowski
2026-08-03 9:09 ` sashiko-bot
2026-08-05 7:09 ` Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 06/11] dtc: dt-check-style: Fix alignment of values in continued property lines Krzysztof Kozlowski
2026-08-03 9:21 ` sashiko-bot [this message]
2026-08-05 7:12 ` Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 07/11] dtc: dt-check-style: Consistently call 'kind' as 'file_type' Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 08/11] dtc: dt-check-style: Introduce 'stricter' mode Krzysztof Kozlowski
2026-08-03 9:16 ` sashiko-bot
2026-08-05 7:06 ` Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 09/11] dtc: dt-check-style: Add test for trailing white-space in DTS Krzysztof Kozlowski
2026-08-03 9:11 ` sashiko-bot
2026-08-05 7:03 ` Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 10/11] dtc: dt-check-style: Add warning for redundant white-spaces Krzysztof Kozlowski
2026-08-03 9:13 ` sashiko-bot
2026-08-05 7:12 ` Krzysztof Kozlowski
2026-08-03 9:03 ` [PATCH v3 11/11] 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=20260803092141.279881F00A3A@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.