From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Saravana Kannan <saravanak@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Subject: [PATCH 6/6] dtc: dt-check-style: Check for indentation also in continued lines of bindings example
Date: Sat, 29 Aug 2026 21:53:22 +0200 [thread overview]
Message-ID: <20260829-dts-style-checker-sort-v1-6-6693a37d7ae1@oss.qualcomm.com> (raw)
In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com>
Add missing code in check_tab_in_yaml_example() for example in the
bindings to apply the same rule of discouraged tab character also for
continued lines (iterating over all DtsLines is not enough).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
scripts/dtc/dt-check-style | 3 +++
scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml | 2 ++
scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt | 1 +
3 files changed, 6 insertions(+)
diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
index dc5a8ee23d68..0ebbe658b893 100755
--- a/scripts/dtc/dt-check-style
+++ b/scripts/dtc/dt-check-style
@@ -959,6 +959,9 @@ def check_tab_in_yaml_example(ctx):
continue
if '\t' in dl.raw:
yield (dl.lineno, 'tab character not allowed in DTS example')
+ for cont in dl.continuations:
+ if '\t' in cont.raw:
+ yield (cont.lineno, 'tab character not allowed in DTS example')
def check_trailing_whitespace(ctx):
diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml
index c25a0d1a999e..4f76188b5e23 100644
--- a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml
+++ b/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml
@@ -26,4 +26,6 @@ examples:
device@1000 {
compatible = "example,test-mixed";
reg = <0x1000 0x100>;
+ clocks = <1>,
+ <2>;
};
diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt
index bc3fc3cf00cc..442f21f90e83 100644
--- a/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt
+++ b/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt
@@ -1,2 +1,3 @@
# mode=relaxed
bad/yaml-mixed-indent.yaml:27: example 0 [tab-in-yaml] tab character not allowed in DTS example
+bad/yaml-mixed-indent.yaml:30: example 0 [tab-in-yaml] tab character not allowed in DTS example
--
2.53.0
prev parent reply other threads:[~2026-08-29 19:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 19:53 [PATCH 0/6] dtc: dt-check-style: Cleanup plus new checks Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 1/6] dtc: dt-check-style: Sort rule directory by name Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 2/6] dtc: dt-check-style: Sort rule functions " Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 3/6] dtc: dt-check-style: Process property names with a question mark Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 4/6] dtc: dt-check-style: Add test for node and property name styles Krzysztof Kozlowski
2026-08-30 19:59 ` Rob Herring
2026-08-30 20:57 ` Krzysztof Kozlowski
2026-08-31 17:58 ` Rob Herring
2026-08-29 19:53 ` [PATCH 5/6] dtc: dt-check-style: Check for indentation also in continued lines of DTS Krzysztof Kozlowski
2026-08-29 19:53 ` Krzysztof Kozlowski [this message]
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=20260829-dts-style-checker-sort-v1-6-6693a37d7ae1@oss.qualcomm.com \
--to=krzysztof.kozlowski@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
/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