diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> | 2026-07-09 19:41:29 +0200 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2026-07-20 15:50:56 -0500 |
| commit | 49b5cf461dd74142bdac50127d146b391af3f151 (patch) | |
| tree | 18e5ec72f21c953c7c11734d82232351847602db /scripts | |
| parent | c6fa876d8641dd01601d0f0a43733792bc4d1678 (diff) | |
dtc: dt-check-style: Narrow disallowing of tab in DTS only to YAML
DTS in the bindings (example in a YAML file) does not have tabs at all,
but regular DTS do, therefore entire check check_tab_in_dts() has
confusing name and should apply only to YAML files.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260709-dts-style-checker-v5-1-fcc147cb697d@oss.qualcomm.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/dtc/dt-check-style | 8 | ||||
| -rw-r--r-- | scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt | 2 | ||||
| -rw-r--r-- | scripts/dtc/dt-style-selftest/expected/yaml-tab.yaml.txt | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 2d5723d41ea3..29b25ecf15c6 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -340,7 +340,7 @@ def check_trailing_whitespace(ctx): yield (dl.lineno, 'trailing whitespace') -def check_tab_in_dts(ctx): +def check_tab_in_yaml_example(ctx): """Reject literal tabs in DTS lines when input is YAML. For YAML examples, indent and content must use spaces. Tabs inside @@ -927,9 +927,9 @@ RULES = [ Rule('trailing-whitespace', 'relaxed', 'no trailing whitespace on any line', check_trailing_whitespace), - Rule('tab-in-dts', 'relaxed', - 'YAML examples may not contain tab characters', - check_tab_in_dts, applies_to=('yaml',)), + Rule('tab-in-yaml', 'relaxed', + 'YAML (also DTS examples) may not contain tab characters', + check_tab_in_yaml_example, applies_to=('yaml',)), Rule('mixed-indent-chars', 'relaxed', 'indent must not mix tabs and spaces', check_mixed_indent_chars), 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 c989f8f19853..4b3d990e0824 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,3 +1,3 @@ # mode=relaxed bad/yaml-mixed-indent.yaml:27: example 0 [mixed-indent-chars] mixed tabs and spaces in indent -bad/yaml-mixed-indent.yaml:27: example 0 [tab-in-dts] tab character not allowed in DTS example +bad/yaml-mixed-indent.yaml:27: example 0 [tab-in-yaml] tab character not allowed in DTS example diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-tab.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-tab.yaml.txt index 9e83246fbaa1..0bc67ae48dd8 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-tab.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-tab.yaml.txt @@ -1,2 +1,2 @@ # mode=relaxed -bad/yaml-tab.yaml:28: example 0 [tab-in-dts] tab character not allowed in DTS example +bad/yaml-tab.yaml:28: example 0 [tab-in-yaml] tab character not allowed in DTS example |
