Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guo Ren" <guoren@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles
Date: Sat, 15 Aug 2026 02:02:33 +0000	[thread overview]
Message-ID: <20260815020233.E51F81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260815015722.1736831-3-guoren@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added `xuantie` equivalent compatible strings were omitted from the `allOf` conditional block that restricts the `thead,vlenb` property, causing valid device trees to fail schema validation.
--

--- Patch [2]: [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles ---
commit 8fd8dd2156e30474207bea785ee6877565dc1eff
Author: GUO Ren (XuanTie) <guoren@kernel.org>

dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles

The RISC-V CPU bindings currently use the historical thead vendor
prefix for the XuanTie C906, C908, C910 and C920 processors. This patch
adds equivalent compatibles using the newly defined xuantie vendor
prefix. It keeps the existing thead compatibles to preserve compatibility
with existing device trees.

> diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml
> index 5feeb2203050a..5aba1e8ed1952 100644
> --- a/Documentation/devicetree/bindings/riscv/cpus.yaml
> +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
> @@ -67,6 +67,10 @@ properties:
>                - thead,c908
>                - thead,c910
>                - thead,c920
> +              - xuantie,c906
> +              - xuantie,c908
> +              - xuantie,c910
> +              - xuantie,c920

[Severity: Medium]
Since these new compatible strings are equivalents to the existing "thead,*"
compatibles, shouldn't they also be added to the allOf conditional block that
governs the "thead,vlenb" property?

Earlier in this file, the schema restricts the property like this:

allOf:
  - $ref: /schemas/cpu.yaml#
  - $ref: extensions.yaml
  - if:
      not:
        properties:
          compatible:
            contains:
              enum:
                - thead,c906
                - thead,c910
                - thead,c920
    then:
      properties:
        thead,vlenb: false

If a device tree node is defined with compatible = "xuantie,c906" and
includes the "thead,vlenb" property, won't the allOf block evaluate true
and incorrectly enforce "thead,vlenb: false", causing schema validation to
fail?

>            - const: riscv
>        - items:
>            - enum:

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260815015722.1736831-1-guoren@kernel.org?part=2

      reply	other threads:[~2026-08-15  2:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-15  1:57 [PATCH 0/2] dt-bindings: Add Xuantie Semiconductor Co., Ltd Guo Ren
2026-08-15  1:57 ` [PATCH 1/2] dt-bindings: vendor-prefixes: Add Xuantie Semiconductor Guo Ren
2026-08-15  1:57 ` [PATCH 2/2] dt-bindings: riscv: Add Xuantie C906/C908/C910/C920 compatibles Guo Ren
2026-08-15  2:02   ` sashiko-bot [this message]

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=20260815020233.E51F81F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guoren@kernel.org \
    --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