Thread (16 messages) 16 messages, 11 authors, 2021-02-06

Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-02-03 08:02:35
Also in: dri-devel, linux-clk, linux-crypto, linux-gpio, linux-i2c, linux-iommu, linux-leds, linux-mmc, linux-watchdog, lkml

Hi Rob,

On Tue, Feb 2, 2021 at 9:55 PM Rob Herring [off-list ref] wrote:
Properties in if/then schemas weren't getting checked by the meta-schemas.
Enabling meta-schema checks finds several errors.

The use of an 'items' schema (as opposed to the list form) is wrong in
some cases as it applies to all entries. 'contains' is the correct schema
to use in the case of multiple entries.
Signed-off-by: Rob Herring <robh@kernel.org>
Thanks for your patch!
quoted hunk ↗ jump to hunk
--- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
@@ -81,9 +81,8 @@ properties:
 if:
   properties:
     compatible:
-      items:
-        enum:
-          - renesas,usb2-phy-r7s9210
+      contains:
+        const: renesas,usb2-phy-r7s9210
Single entry, so "contains" not needed?
quoted hunk ↗ jump to hunk
--- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml
@@ -76,11 +76,10 @@ required:
 if:
   properties:
     compatible:
-      items:
-        enum:
-          - renesas,pfc-r8a73a4
-          - renesas,pfc-r8a7740
-          - renesas,pfc-sh73a0
+      enum:
+        - renesas,pfc-r8a73a4
+        - renesas,pfc-r8a7740
+        - renesas,pfc-sh73a0
Missing "contains"?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help