Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 7/7] dtc: dt-check-style: Relax property ordering rules (drop alphabetical)
Date: Tue, 15 Sep 2026 17:38:33 +0000	[thread overview]
Message-ID: <20260915173834.29EF31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915-b4-dts-style-checker-continued-lines-v4-7-5b8e09b11ef2@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] scripts/dtc: missing pairing rule for #size-cells in dt-check-style
--

commit 15a33e22443049ad6dfd20bb7612f0fac6037dcf
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

dtc: dt-check-style: Relax property ordering rules (drop alphabetical)

Existing rules checked whether properties follow DTS Coding Style
guidelines in respect of common properties and standard vs vendor
properties, plus additionally it enforced alphabetical order within each
of such group. This commit relaxes the property order rules to skip
alphabetical sorting and only check logical groupings.

> diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
> index cbbb8d384aca2..b8c40873905c3 100755
> --- a/scripts/dtc/dt-check-style
> +++ b/scripts/dtc/dt-check-style
[ ... ]
> @@ -803,33 +777,27 @@ def _pair_x_names(name, all_names):
>  PAIRING_RULES = (_pair_pinctrl_names, _pair_x_names)

[Severity: Low]
Is this missing a pairing rule for #size-cells?

The docstring for check_property_order() explicitly notes that #size-cells
must follow #address-cells, but it looks like the implementation for this
rule was omitted from PAIRING_RULES.

>  
> -def _property_sort_key(dl, name, all_names):
[ ... ]
>  def check_property_order(ctx):
> -    """Properties within a node body must appear in canonical order:
> -    compatible, reg(/reg-names), ranges, then the standard group, then
> -    the vendor-specific group, then status. Inside the standard and
> -    vendor groups, pairing rules apply (e.g. <x>-names follows <x>);
> -    everything else falls back to natural sort by the #-stripped name."""
> +    """Properties within a node body must be grouped in canonical
> +    order: device_type ('model' for the root node), compatible,
> +    reg(/reg-names), ranges, then the standard group, then the
> +    vendor-specific group, then status.
> +
> +    The order of properties within one group is free, e.g. it does not
> +    matter whether '#address-cells' comes before or after 'clocks'.
> +    Paired properties still keep their relative order: <x>-names
> +    follows <x> (clocks/clock-names, reg/reg-names, ...), pinctrl-names
> +    follows the pinctrl-N states and #size-cells follows
> +    #address-cells."""
>      lines = ctx.lines

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915-b4-dts-style-checker-continued-lines-v4-0-5b8e09b11ef2@oss.qualcomm.com?part=7

  reply	other threads:[~2026-09-15 17:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 17:03 [PATCH v4 0/7] dtc: dt-check-style: Improvements for handling continued lines Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 1/7] dtc: dt-check-style: Handle continued lines in check_hex_case() Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 2/7] dtc: dt-check-style: Handle continued lines in check_line_length() Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 3/7] dtc: dt-check-style: Handle continued lines in check_trailing_whitespace() Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 4/7] dtc: dt-check-style: Unduplicate checks in check_mixed_indent_chars() Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 5/7] dtc: dt-check-style: Right strip whitespaces, leftovers before comments Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 6/7] dtc: dt-check-style: Properly detect comments in multi-line properties Krzysztof Kozlowski
2026-09-15 17:03 ` [PATCH v4 7/7] dtc: dt-check-style: Relax property ordering rules (drop alphabetical) Krzysztof Kozlowski
2026-09-15 17:38   ` sashiko-bot [this message]
2026-09-16  5:50     ` Krzysztof Kozlowski
2026-09-16 20:20 ` [PATCH v4 0/7] dtc: dt-check-style: Improvements for handling continued lines Rob Herring

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=20260915173834.29EF31F000FF@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