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) <[email protected]>
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/[email protected]?part=2
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.