Re: [PATCH v3 04/11] dtc: dt-check-style: Handle sorting of top-level nodes and properties

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Spurious expected error line in a test output file will cause the selftest suite to fail.
--

--- Patch [4]: [PATCH v3 04/11] dtc: dt-check-style: Handle sorting of top-level nodes and properties ---
commit e2a1efff1b6b0ed83316a48d24047cc58103d45d
Author: Krzysztof Kozlowski <[email protected]>

dtc: dt-check-style: Handle sorting of top-level nodes and properties

This patch updates dt-check-style to handle special sorting rules for
top-level nodes and properties. It modifies the tool to sort root-level
nodes by name rather than unit address, and requires the 'model' property
to precede 'compatible' at the root level. Test fixtures and expected
outputs are updated accordingly.

> diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt
> index 4bc21328625f9..29283f3451c78 100644
> --- a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt
> +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt
> @@ -1,6 +1,9 @@
>  # mode=strict
> -bad/dts-property-order.dts:15: [property-order] property 'compatible' out of canonical order (should sort before 'reg')
> -bad/dts-property-order.dts:16: [property-order] property 'device_type' out of canonical order (should sort before 'compatible')
> -bad/dts-property-order.dts:25: [property-order] property 'dma-coherent' out of canonical order (should sort before 'status')
> -bad/dts-property-order.dts:30: [property-order] property 'compatible' out of canonical order (should sort before 'ranges')
> -bad/dts-property-order.dts:40: [property-order] property 'compatible' out of canonical order (should sort before 'interrupts')
> +bad/dts-property-order.dts:8: [redundant-whitespace] extra whitespace before {

[Severity: Medium]
Will this cause the selftest suite to fail unconditionally?

The expected output file now looks for a [redundant-whitespace] error, but
the dt-check-style script does not appear to implement a redundant-whitespace
rule or emit this string. 

Since the test runner requires an exact match between the tool's output and 
this expected text file, does this spurious expected line break the test 
suite?

> +bad/dts-property-order.dts:10: [property-order] property 'model' out of canonical order (should sort before 'compatible')
> +bad/dts-property-order.dts:12: [property-order] property 'chassis-type' out of canonical order (should sort before 'qcom,board-id')
> +bad/dts-property-order.dts:20: [property-order] property 'compatible' out of canonical order (should sort before 'reg')

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.