LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dt-bindings: sifive-l2-cache: Fix 'select' matching
@ 2021-08-17 17:47 Rob Herring
2021-08-20 4:31 ` Palmer Dabbelt
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2021-08-17 17:47 UTC (permalink / raw)
To: devicetree
Cc: linux-kernel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Sagar Kadam, Yash Shah, linux-riscv
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")
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Sagar Kadam <sagar.kadam@sifive.com>
Cc: Yash Shah <yash.shah@sifive.com>
Cc: linux-riscv@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
.../devicetree/bindings/riscv/sifive-l2-cache.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
index 1d38ff76d18f..2b1f91603897 100644
--- a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
+++ b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
@@ -24,10 +24,10 @@ allOf:
select:
properties:
compatible:
- items:
- - enum:
- - sifive,fu540-c000-ccache
- - sifive,fu740-c000-ccache
+ contains:
+ enum:
+ - sifive,fu540-c000-ccache
+ - sifive,fu740-c000-ccache
required:
- compatible
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: sifive-l2-cache: Fix 'select' matching
2021-08-17 17:47 [PATCH] dt-bindings: sifive-l2-cache: Fix 'select' matching Rob Herring
@ 2021-08-20 4:31 ` Palmer Dabbelt
0 siblings, 0 replies; 2+ messages in thread
From: Palmer Dabbelt @ 2021-08-20 4:31 UTC (permalink / raw)
To: robh
Cc: devicetree, linux-kernel, Paul Walmsley, aou, sagar.kadam,
yash.shah, linux-riscv
On Tue, 17 Aug 2021 10:47:55 PDT (-0700), robh@kernel.org wrote:
> 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")
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: Sagar Kadam <sagar.kadam@sifive.com>
> Cc: Yash Shah <yash.shah@sifive.com>
> Cc: linux-riscv@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> .../devicetree/bindings/riscv/sifive-l2-cache.yaml | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
> index 1d38ff76d18f..2b1f91603897 100644
> --- a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
> +++ b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml
> @@ -24,10 +24,10 @@ allOf:
> select:
> properties:
> compatible:
> - items:
> - - enum:
> - - sifive,fu540-c000-ccache
> - - sifive,fu740-c000-ccache
> + contains:
> + enum:
> + - sifive,fu540-c000-ccache
> + - sifive,fu740-c000-ccache
>
> required:
> - compatible
Thanks, this is on fixes.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-20 4:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 17:47 [PATCH] dt-bindings: sifive-l2-cache: Fix 'select' matching Rob Herring
2021-08-20 4:31 ` Palmer Dabbelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).