[PATCH 1/3] dt-bindings: net: sun7i-gmac: Fix snps,dwmac.yaml inheritance

Samuel Holland posted 3 patches 2 years, 9 months ago
[PATCH 1/3] dt-bindings: net: sun7i-gmac: Fix snps,dwmac.yaml inheritance
Posted by Samuel Holland 2 years, 9 months ago
The sun7i-gmac binding extends snps,dwmac.yaml, and should accept all
properties defined there, including "mdio", "resets", and "reset-names".
However, validation currently fails for these properties because the
local binding sets "unevaluatedProperties: false", and snps,dwmac.yaml
is only included inside an allOf block. Fix this by referencing
snps,dwmac.yaml at the top level.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 .../devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml
index 3bd912ed7c7e..7d2c62b4ccad 100644
--- a/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml
+++ b/Documentation/devicetree/bindings/net/allwinner,sun7i-a20-gmac.yaml
@@ -6,13 +6,12 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Allwinner A20 GMAC
 
-allOf:
-  - $ref: "snps,dwmac.yaml#"
-
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
   - Maxime Ripard <mripard@kernel.org>
 
+$ref: "snps,dwmac.yaml#"
+
 properties:
   compatible:
     const: allwinner,sun7i-a20-gmac
-- 
2.37.4
Re: [PATCH 1/3] dt-bindings: net: sun7i-gmac: Fix snps,dwmac.yaml inheritance
Posted by Krzysztof Kozlowski 2 years, 9 months ago
On 25/11/2022 21:20, Samuel Holland wrote:
> The sun7i-gmac binding extends snps,dwmac.yaml, and should accept all
> properties defined there, including "mdio", "resets", and "reset-names".
> However, validation currently fails for these properties because the
> local binding sets "unevaluatedProperties: false", and snps,dwmac.yaml
> is only included inside an allOf block. Fix this by referencing
> snps,dwmac.yaml at the top level.
> 

I don't understand where is the problem and how does your patch solve
it. The old syntax is correct and your change does nothing, no fixing,
no impact. It actually looks like noop with big explanation :(

> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---


Best regards,
Krzysztof