Skip to contentSkip to conversation

dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas

PATCH Applied Rob Herring 3 participants 3 messages Sep 26, 2023 – Sep 28, 2023

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas

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.

Add unevaluatedProperties as needed, and then add any missing properties flagged by the addition.

---
 .../bindings/thermal/nvidia,tegra124-soctherm.yaml           | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml +5 -0
index 04a2ba1aa946..b0237d236021 100644
@@ -68,7 +68,12 @@ properties:
     patternProperties:
       "^(light|heavy|oc1)$":
         type: object
+        additionalProperties: false
+
         properties:
+          "#cooling-cells":
+            const: 2
+
           nvidia,priority:
             $ref: /schemas/types.yaml#/definitions/uint32
             minimum: 1
Signature · 1 line
2.40.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Rob Herring

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.

Add unevaluatedProperties as needed, and then add any missing properties flagged by the addition.

Thanks,
Conor.

Quoted 24 lines
---
 .../bindings/thermal/nvidia,tegra124-soctherm.yaml           | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml +5 -0
index 04a2ba1aa946..b0237d236021 100644
@@ -68,7 +68,12 @@ properties:
     patternProperties:
       "^(light|heavy|oc1)$":
         type: object
+        additionalProperties: false
+
         properties:
+          "#cooling-cells":
+            const: 2
+
           nvidia,priority:
             $ref: /schemas/types.yaml#/definitions/uint32
             minimum: 1
Signature · 1 line
2.40.1
#2 lore raw
In reply to Rob Herring
Quoted 10 lines · Rob Herring

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.

Add unevaluatedProperties as needed, and then add any missing properties flagged by the addition.

---

Applied, thanks

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog