Re: [PATCH 3/9] dtc: dt-check-style: Handle root node in overlays

Krzysztof Kozlowski <[email protected]> Sat, 1 Aug 2026 19:45:16 +0200
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
On 01/08/2026 19:43, Krzysztof Kozlowski wrote:
> On 26/07/2026 18:00, [email protected] wrote:
>>> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
>>> --- a/scripts/dtc/dt-check-style
>>> +++ b/scripts/dtc/dt-check-style
>>
>> [ ... ]
>>
>>> @@ -228,7 +229,10 @@ def classify_lines(text):
>>>              continue
>>>  
>>>          if code.endswith('{'):
>>> -            dl = DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, code)
>>> +            is_root = False
>>> +            if code == '&{/} {' or code == '/ {':
>>
>> [Severity: Medium]
>> Will this exact string match handle valid alternative spacings or labels?
>> For example, if the code contains a label like "label: / {" or extra
> 
> We don't label root node, but I will add a test for that.
> 

Root node cannot have label, so no need.

Best regards,
Krzysztof