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 v4 6/7] dtc: dt-check-style: Print proper line number of indentation detection place
Date: Wed, 08 Jul 2026 14:54:52 +0000 [thread overview]
Message-ID: <20260708145452.E9AF91F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-dts-style-checker-v4-6-c175e6401150@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Outdated docstring for detect_indent_unit()
- [Low] Unused variable `lineno` in `check_indent_consistent()`
--
--- Patch [6]: [PATCH v4 6/7] dtc: dt-check-style: Print proper line number of indentation detection place ---
commit 0faea90fe4385d4895b11cc94353072a1a5f9347
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Print proper line number of indentation detection place
Script judges the indentation however always suggests it is the first
line which is wrong, e.g.:
sigmastar/mstar-infinity2m.dtsi:1: [indent-unit-dts] indent unit must be 1 tab in DTS, got '\t\t'
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index 9a5263a30663f..df056e4d0a5b5 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
> @@ -397,48 +397,48 @@ def detect_indent_unit(ctx):
> if not dl.indent_str:
> continue
> if dl.indent_str == '\t':
> - return '\t'
> + return ('\t', dl.lineno)
[Severity: Low]
Is there a documentation regression here?
Looking at the top of detect_indent_unit():
"""Find the indent unit used at depth 1 in this block.
Returns one of: ' ' (2 spaces), ' ' (4 spaces), '\t' (tab),
or None if depth-1 is empty or ambiguous."""
Since it now returns a 2-tuple instead, should the docstring be updated to
reflect this change?
[ ... ]
> def check_indent_consistent(ctx):
> """All indented lines must be a multiple of the detected unit."""
> - unit = detect_indent_unit(ctx)
> + (unit, lineno) = detect_indent_unit(ctx)
> if unit is None:
> return
> if ctx.file_type == 'yaml':
[Severity: Low]
Is there a minor regression here with an unused variable?
It appears lineno is unpacked from the tuple but never used anywhere in
check_indent_consistent().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-dts-style-checker-v4-0-c175e6401150@oss.qualcomm.com?part=6
next prev parent reply other threads:[~2026-07-08 14:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 14:40 [PATCH v4 0/7] dtc: dt-check-style: Improvement after using on DTS Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 1/7] dtc: dt-check-style: Narrow disallowing of tab in DTS only to YAML Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 2/7] dtc: dt-check-style: Allow space-aligning indentation in DTS Krzysztof Kozlowski
2026-07-08 14:50 ` sashiko-bot
2026-07-09 17:24 ` Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 3/7] dtc: dt-check-style: Rework handling YAML/DTS in rules Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 4/7] dtc: dt-check-style: Expect first device_type Krzysztof Kozlowski
2026-07-08 14:52 ` sashiko-bot
2026-07-09 17:26 ` Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 5/7] dtc: dt-check-style: Handle properly DTC-style includes Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 6/7] dtc: dt-check-style: Print proper line number of indentation detection place Krzysztof Kozlowski
2026-07-08 14:54 ` sashiko-bot [this message]
2026-07-09 17:31 ` Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 7/7] dtc: dt-check-style: Add more DTS test cases Krzysztof Kozlowski
2026-07-08 14:58 ` sashiko-bot
2026-07-09 17:32 ` 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=20260708145452.E9AF91F000E9@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.