From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 4/7] dtc: dt-check-style: Expect first device_type
Date: Wed, 08 Jul 2026 14:52:06 +0000 [thread overview]
Message-ID: <20260708145208.2E17F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708-dts-style-checker-v4-4-c175e6401150@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Low] The `compatible` string in the YAML example does not match the schema constraint.
- [Low] Copy-paste error in the comment of the 'good' test fixture.
- [Low] The docstring for `_property_bucket` missed an update for the new `device_type` fixed slot.
--
--- Patch [4]: [PATCH v4 4/7] dtc: dt-check-style: Expect first device_type ---
commit c078538281e29a1c935623ba80b1e47b07008331
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dtc: dt-check-style: Expect first device_type
Adjust the DTS coding style rules to expect the device_type property first
and improve the dt-check-style script to handle this correctly, along with
new test fixtures.
> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index bb9ec5b82319e..23cdfe78b1890 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
> @@ -558,28 +558,31 @@ def check_child_name_order(ctx):
>
> def _property_bucket(name):
> """Return the canonical bucket index for a property:
> - 0 compatible
> - 1 reg / reg-names
> - 2 ranges
> - 3 standard properties (no vendor comma in #-stripped name)
> - 4 vendor-specific properties
> - 5 status
> + 0 device_type
> + 1 compatible
> + 2 reg / reg-names
> + 3 ranges
> + 4 standard properties (no vendor comma in #-stripped name)
> + 5 vendor-specific properties
> + 6 status
> Plus a sub-key inside the bucket for fixed slots (compatible, reg,
> reg-names, ranges, status). 'standard' and 'vendor' return None for
[Severity: Low]
This isn't a bug, but should device_type be added to the list of fixed slots
in this parenthetical?
> the sub-key, signalling that the within-bucket key is computed by
[ ... ]
> diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml
> new file mode 100644
> index 0000000000000..433afb731dded
> --- /dev/null
> +++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml
> @@ -0,0 +1,31 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/test-bad-prop-order.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Test fixture with device_type
> +
> +maintainers:
> + - Test User <test@example.com>
> +
> +properties:
> + compatible:
> + const: example,test-prop-order-device-type
> + reg:
> + maxItems: 1
> + device_type: true
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + device@1000 {
> + compatible = "example,test-prop-order";
[Severity: Low]
The compatible string used here in the example doesn't match the const
requirement defined in properties.compatible above. Will this cause the test
fixture to fail standard dtschema validation if it's ever checked directly?
> + device_type = "cpu";
> + reg = <0x1000 0x100>;
> + };
[ ... ]
> diff --git a/scripts/dtc/dt-style-selftest/good/dts-property-order.dts b/scripts/dtc/dt-style-selftest/good/dts-property-order.dts
> new file mode 100644
> index 0000000000000..0e183e3459cdf
> --- /dev/null
> +++ b/scripts/dtc/dt-style-selftest/good/dts-property-order.dts
> @@ -0,0 +1,41 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +/*
> + * Test fixture: Incorrect property order
[Severity: Low]
This isn't a bug, but since this is the "good" dts file, should this header
comment be updated to indicate it is testing correct property order?
> + */
> +
> +/dts-v1/;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708-dts-style-checker-v4-0-c175e6401150@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-07-08 14:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 14:40 [PATCH v4 0/7] dtc: dt-check-style: Improvement after using on DTS Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 1/7] dtc: dt-check-style: Narrow disallowing of tab in DTS only to YAML Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 2/7] dtc: dt-check-style: Allow space-aligning indentation in DTS Krzysztof Kozlowski
2026-07-08 14:50 ` sashiko-bot
2026-07-08 14:40 ` [PATCH v4 3/7] dtc: dt-check-style: Rework handling YAML/DTS in rules Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 4/7] dtc: dt-check-style: Expect first device_type Krzysztof Kozlowski
2026-07-08 14:52 ` sashiko-bot [this message]
2026-07-08 14:40 ` [PATCH v4 5/7] dtc: dt-check-style: Handle properly DTC-style includes Krzysztof Kozlowski
2026-07-08 14:40 ` [PATCH v4 6/7] dtc: dt-check-style: Print proper line number of indentation detection place Krzysztof Kozlowski
2026-07-08 14:54 ` sashiko-bot
2026-07-08 14:40 ` [PATCH v4 7/7] dtc: dt-check-style: Add more DTS test cases Krzysztof Kozlowski
2026-07-08 14:58 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260708145208.2E17F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox