[PATCH 5.10 051/103] dt-bindings: sifive-l2-cache: Fix select matching

From
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date
2021-09-01 12:41:23
Also in
stable
Reply to
Greg Kroah-Hartman, 2021-09-01
From: Rob Herring <robh@kernel.org>

[ Upstream commit 1c8094e394bceb4f1880f9d539bdd255c130826e ]

When the schema fixups are applied to 'select' the result is a single
entry is required for a match, but that will never match as there should
be 2 entries. Also, a 'select' schema should have the widest possible
match, so use 'contains' which matches the compatible string(s) in any
position and not just the first position.

Fixes: 993dcfac64eb ("dt-bindings: riscv: sifive-l2-cache: convert bindings to json-schema")
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: <redacted>
Signed-off-by: Palmer Dabbelt <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .../devicetree/bindings/riscv/sifive-l2-cache.yaml          | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
index efc0198eeb74..5444be7667b6 100644
--- a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
+++ b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
@@ -24,9 +24,9 @@ allOf:
 select:
   properties:
     compatible:
-      items:
-        - enum:
-            - sifive,fu540-c000-ccache
+      contains:
+        enum:
+          - sifive,fu540-c000-ccache
 
   required:
     - compatible
-- 
2.30.2


Thread (118 messages) 118 messages, 11 authors, last reply 2021-09-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help