Re: [PATCH v3 2/7] media: dt-bindings: hynix,hi846: Restrict endpoint properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 30, 2023 at 04:59:46PM +0200, Jacopo Mondi wrote:
> Only properties explicitly listed in the schema are accepted as
> endpoint properties.
> 
> Make sure this is actually enforced by setting 'additionalProperties'
> to false and explicitly allow 'remote-endpoint' in the list of
> endpoint properties.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>
> ---
>  Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml b/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
> index 60f19e1152b3..f2ca86501d3c 100644
> --- a/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/hynix,hi846.yaml
> @@ -58,7 +58,7 @@ properties:
>      properties:
>        endpoint:
>          $ref: /schemas/media/video-interfaces.yaml#
> -        unevaluatedProperties: false
> +        additionalProperties: false

If anything 'additionalProperties' is the exception and 
'unevaluatedProperties' is the rule. Just grep refs to 
video-interfaces.yaml. Why did you change this for just 
this 1 device? 

I'm more worried about undocumented properties than a documented 
property which makes no sense for the h/w being present. So I think 
as-is was fine.

>  
>          properties:
>            data-lanes:
> @@ -73,6 +73,7 @@ properties:
>                    - const: 2
>  
>            link-frequencies: true

I suppose we could remove this as it has no effect on the schema 
validation, but it's probably worthwhile to keep for documentation 
purposes.

Rob

> +          remote-endpoint: true
>  
>          required:
>            - data-lanes
> -- 
> 2.42.0
> 



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux