diff mbox series

media: dt-bindings: Add missing unevaluatedProperties on child node schemas

Message ID 20230925212803.1976803-1-robh@kernel.org
State Accepted
Commit a47f580c8a31a7f3f20676bc2aa7e6b1403648af
Headers show
Series media: dt-bindings: Add missing unevaluatedProperties on child node schemas | expand

Commit Message

Rob Herring (Arm) Sept. 25, 2023, 9:27 p.m. UTC
Just as unevaluatedProperties or additionalProperties are required at
the top level of schemas, they should (and will) also be required for
child node schemas. That ensures only documented properties are
present for any node.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml    | 1 +
 .../devicetree/bindings/media/i2c/toshiba,tc358746.yaml         | 2 ++
 Documentation/devicetree/bindings/media/samsung,fimc.yaml       | 1 +
 3 files changed, 4 insertions(+)

Comments

Conor Dooley Sept. 26, 2023, 1:03 p.m. UTC | #1
On Mon, Sep 25, 2023 at 04:27:58PM -0500, Rob Herring wrote:
> Just as unevaluatedProperties or additionalProperties are required at
> the top level of schemas, they should (and will) also be required for
> child node schemas. That ensures only documented properties are
> present for any node.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml    | 1 +
>  .../devicetree/bindings/media/i2c/toshiba,tc358746.yaml         | 2 ++
>  Documentation/devicetree/bindings/media/samsung,fimc.yaml       | 1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
> index ffccf5f3c9e3..642f9b15d359 100644
> --- a/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
> @@ -54,6 +54,7 @@ properties:
>  
>    port:
>      $ref: /schemas/graph.yaml#/$defs/port-base
> +    unevaluatedProperties: false
>  
>      properties:
>        endpoint:
> diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml
> index c5cab549ee8e..1c476b635b69 100644
> --- a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml
> @@ -69,6 +69,7 @@ properties:
>      properties:
>        port@0:
>          $ref: /schemas/graph.yaml#/$defs/port-base
> +        unevaluatedProperties: false
>          description: Input port
>  
>          properties:
> @@ -89,6 +90,7 @@ properties:
>  
>        port@1:
>          $ref: /schemas/graph.yaml#/$defs/port-base
> +        unevaluatedProperties: false
>          description: Output port
>  
>          properties:
> diff --git a/Documentation/devicetree/bindings/media/samsung,fimc.yaml b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
> index 79ff6d83a9fd..b3486c38a05b 100644
> --- a/Documentation/devicetree/bindings/media/samsung,fimc.yaml
> +++ b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
> @@ -57,6 +57,7 @@ properties:
>      patternProperties:
>        "^port@[01]$":
>          $ref: /schemas/graph.yaml#/$defs/port-base
> +        unevaluatedProperties: false
>          description:
>            Camera A and camera B inputs.
>  
> -- 
> 2.40.1
>
Rob Herring (Arm) Oct. 6, 2023, 6:52 p.m. UTC | #2
On Mon, 25 Sep 2023 16:27:58 -0500, Rob Herring wrote:
> Just as unevaluatedProperties or additionalProperties are required at
> the top level of schemas, they should (and will) also be required for
> child node schemas. That ensures only documented properties are
> present for any node.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml    | 1 +
>  .../devicetree/bindings/media/i2c/toshiba,tc358746.yaml         | 2 ++
>  Documentation/devicetree/bindings/media/samsung,fimc.yaml       | 1 +
>  3 files changed, 4 insertions(+)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
index ffccf5f3c9e3..642f9b15d359 100644
--- a/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
@@ -54,6 +54,7 @@  properties:
 
   port:
     $ref: /schemas/graph.yaml#/$defs/port-base
+    unevaluatedProperties: false
 
     properties:
       endpoint:
diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml
index c5cab549ee8e..1c476b635b69 100644
--- a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml
@@ -69,6 +69,7 @@  properties:
     properties:
       port@0:
         $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description: Input port
 
         properties:
@@ -89,6 +90,7 @@  properties:
 
       port@1:
         $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description: Output port
 
         properties:
diff --git a/Documentation/devicetree/bindings/media/samsung,fimc.yaml b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
index 79ff6d83a9fd..b3486c38a05b 100644
--- a/Documentation/devicetree/bindings/media/samsung,fimc.yaml
+++ b/Documentation/devicetree/bindings/media/samsung,fimc.yaml
@@ -57,6 +57,7 @@  properties:
     patternProperties:
       "^port@[01]$":
         $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description:
           Camera A and camera B inputs.