2023-09-26 16:55:34

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Rob Herring <[email protected]>
---
.../bindings/thermal/nvidia,tegra124-soctherm.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
index 04a2ba1aa946..b0237d236021 100644
--- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
+++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
@@ -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
--
2.40.1


2023-09-27 15:22:53

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas

On Tue, Sep 26, 2023 at 11:44:52AM -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.
>
> Add unevaluatedProperties as needed, and then add any missing properties
> flagged by the addition.
>
> Signed-off-by: Rob Herring <[email protected]>

Acked-by: Conor Dooley <[email protected]>

Thanks,
Conor.

> ---
> .../bindings/thermal/nvidia,tegra124-soctherm.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
> index 04a2ba1aa946..b0237d236021 100644
> --- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
> +++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
> @@ -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
> --
> 2.40.1
>


Attachments:
(No filename) (1.38 kB)
signature.asc (235.00 B)
Download all attachments

2023-09-28 15:42:27

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: thermal: nvidia,tegra124-soctherm: Add missing unevaluatedProperties on child node schemas

On 26/09/2023 18:44, 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.
>
> Add unevaluatedProperties as needed, and then add any missing properties
> flagged by the addition.
>
> Signed-off-by: Rob Herring <[email protected]>
> ---

Applied, thanks

--
<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