diff mbox series

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

Message ID 20220823145649.3118479-5-robh@kernel.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series dt-bindings: net: Add missing (unevaluated|additional)Properties on child nodes | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Rob Herring (Arm) Aug. 23, 2022, 2:56 p.m. UTC
In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../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(+)

Comments

Jakub Kicinski Aug. 25, 2022, 1:50 a.m. UTC | #1
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.
Rob Herring (Arm) Aug. 25, 2022, 3:15 p.m. UTC | #2
On Wed, Aug 24, 2022 at 8:51 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> 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
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml b/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml
index cc01b9b5752a..253b5d1407ee 100644
--- a/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml
+++ b/Documentation/devicetree/bindings/net/cortina,gemini-ethernet.yaml
@@ -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#
diff --git a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
index 31bf825c6598..46e330f45768 100644
--- a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
+++ b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
@@ -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
 
diff --git a/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml b/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
index b8281d8be940..fb61a2ce0ea8 100644
--- a/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
+++ b/Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml
@@ -115,6 +115,7 @@  properties:
         description: CPSWxG NUSS external ports
 
         $ref: ethernet-controller.yaml#
+        unevaluatedProperties: false
 
         properties:
           reg:
diff --git a/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml b/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
index b783ad0d1f53..e9f78cef6b7f 100644
--- a/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
+++ b/Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
@@ -95,6 +95,7 @@  properties:
 
   refclk-mux:
     type: object
+    additionalProperties: false
     description: CPTS reference clock multiplexer clock
     properties:
       '#clock-cells':