summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2026-08-29 21:53:22 +0200
committerRob Herring (Arm) <robh@kernel.org>2026-08-31 13:00:20 -0500
commit99a1ea49cd4239726f2382213c273f73bcb6a93d (patch)
treecc975426a2eaaa92945b41337bafc914807187bf /scripts
parent233c5c03adbfa0a39f64556f7b7198bc989f4b12 (diff)
dtc: dt-check-style: Check for indentation also in continued lines of bindings example
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> Link: https://patch.msgid.link/20260829-dts-style-checker-sort-v1-6-6693a37d7ae1@oss.qualcomm.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dtc/dt-check-style3
-rw-r--r--scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml2
-rw-r--r--scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt1
3 files changed, 6 insertions, 0 deletions
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