Re: [PATCH 2/2] dt-check-style: Handle indented fragments in indent-consistent
From: Krzysztof Kozlowski
Date: Tue Sep 01 2026 - 06:08:45 EST
On 01/09/2026 10:49, Sven Peter wrote:
>
>
> On 9/1/26 10:22, Krzysztof Kozlowski wrote:
>> On Sun, Aug 30, 2026 at 08:24:55PM +0200, Sven Peter wrote:
>>> diff --git a/scripts/dtc/dt-style-selftest/expected/dts-fragment-indent.dtsi.txt b/scripts/dtc/dt-style-selftest/expected/dts-fragment-indent.dtsi.txt
>>> new file mode 100644
>>> index 000000000000..84ec8eb73468
>>> --- /dev/null
>>> +++ b/scripts/dtc/dt-style-selftest/expected/dts-fragment-indent.dtsi.txt
>>> @@ -0,0 +1,3 @@
>>> +# mode=strict
>>> +bad/dts-fragment-indent.dtsi:9: [indent-consistent] indent mismatch (expected depth 2 * '\t')
>>> +bad/dts-fragment-indent.dtsi:10: [indent-consistent] indent mismatch (expected depth 2 * '\t')
>>> diff --git a/scripts/dtc/dt-style-selftest/good/dts-fragment.dtsi b/scripts/dtc/dt-style-selftest/good/dts-fragment.dtsi
>>> new file mode 100644
>>> index 000000000000..58735112d3aa
>>> --- /dev/null
>>> +++ b/scripts/dtc/dt-style-selftest/good/dts-fragment.dtsi
>>> @@ -0,0 +1,19 @@
>>> +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>>> +/* Include fragment indented for its inclusion context. */
>>> +
>>> + bus@10000 {
>> So here is a good example... and this is code is wrong.
>>
>> You CANNOT have MMIO node outside of MMIO bus or a new node outside of
>> root node indented with one tab.
>
> Fair enough, just ignore this series then.
> I'll just do the whitespace fix then and un-indent the -dieX files for
> apple which I think should make them pass the checker then.
>
I see Apple DTS two soc nodes, so overriding/extending by phandle is a
bit trickier, but this should work in t600x-dieX.dtsi:
// earlier macro (or however you concatenate these)
#define DIE_NODE die0
&DIE_NODE {
// here goes stuff with original indentation
DIE_NODE(cpufreq_e): cpufreq@210e20000 {
...
};
};
Best regards,
Krzysztof