summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2026-08-26 13:16:00 +0200
committerRob Herring (Arm) <robh@kernel.org>2026-08-31 08:23:17 -0500
commitf976e82f64d99c028bb503c4993754d14ea96996 (patch)
treea775b6aa3c83e8ba7db723bcc25811a1ba5e6b22 /scripts
parente1945a960f35b17bcbcea55dabca76384f6321d4 (diff)
downloadlinux-next-f976e82f64d99c028bb503c4993754d14ea96996.tar.gz
linux-next-f976e82f64d99c028bb503c4993754d14ea96996.zip
dtc: dt-check-style: Add test for trailing white-space in DTS
Add unit tests for expected warnings for trailing white-spaces in DTS (there is only one for YAML files). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260826-n-dts-style-checker-continued-v6-8-f270b1e81f8e@oss.qualcomm.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts8
-rw-r--r--scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt2
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts b/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts
new file mode 100644
index 000000000000..1eb24d91c640
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+/dts-v1/;
+
+/ {
+ compatible = "example,test-board";
+ #address-cells = <1>;
+ #size-cells = <1>;
+};
diff --git a/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt
new file mode 100644
index 000000000000..94d9ae9d616c
--- /dev/null
+++ b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt
@@ -0,0 +1,2 @@
+# mode=relaxed
+bad/dts-trailing-ws.dts:5: [trailing-whitespace] trailing whitespace