Skip to contentSkip to conversation

dt-bindings: net: Add missing (unevaluated|additional)Properties on child nodes

PATCH In review Rob Herring 2 participants 3 messages Aug 23, 2022 – Aug 25, 2022

Subsystems (4)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: net: Add missing (unevaluated|additional)Properties on child nodes

In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically).

---
 .../devicetree/bindings/net/cortina,gemini-ethernet.yaml      | 1 +
 Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml     | 4 ++++
 .../devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml        | 1 +
 Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml   | 1 +
 4 files changed, 7 insertions(+)
Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml +1 -0
index cc01b9b5752a..253b5d1407ee 100644
@@ -37,6 +37,7 @@ properties:
 patternProperties:
   "^ethernet-port@[0-9]+$":
     type: object
+    unevaluatedProperties: false
     description: contains the resources for ethernet port
     allOf:
       - $ref: ethernet-controller.yaml#
Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml +4 -0
index 31bf825c6598..46e330f45768 100644
@@ -77,6 +77,8 @@ properties:
 
   ethernet-ports:
     type: object
+    additionalProperties: false
+
     properties:
       '#address-cells':
         const: 1
@@ -89,6 +91,7 @@ properties:
         description: CPSW external ports
 
         $ref: ethernet-controller.yaml#
+        unevaluatedProperties: false
 
         properties:
           reg:
@@ -117,6 +120,7 @@ properties:
 
   cpts:
     type: object
+    unevaluatedProperties: false
     description:
       The Common Platform Time Sync (CPTS) module
 
Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml +1 -0
index b8281d8be940..fb61a2ce0ea8 100644
@@ -115,6 +115,7 @@ properties:
         description: CPSWxG NUSS external ports
 
         $ref: ethernet-controller.yaml#
+        unevaluatedProperties: false
 
         properties:
           reg:
Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml +1 -0
index b783ad0d1f53..e9f78cef6b7f 100644
@@ -95,6 +95,7 @@ properties:
 
   refclk-mux:
     type: object
+    additionalProperties: false
     description: CPTS reference clock multiplexer clock
     properties:
       '#clock-cells':
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw
Quoted 3 lines · On Tue, 23 Aug 2022 09:56:36 -0500 Rob Herring wrote:

In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically).

Would you like this in 6.0 or 6.1? Applies to both, it seems.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#2 lore raw
Quoted 7 lines · Jakub Kicinski
Quoted 3 lines · On Tue, 23 Aug 2022 09:56:36 -0500 Rob Herring wrote:

In order to ensure only documented properties are present, node schemas must have unevaluatedProperties or additionalProperties set to false (typically).

Would you like this in 6.0 or 6.1? Applies to both, it seems.

6.1 is fine, but I found a few more cases, so let me send a v2.

Rob