lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <881e19a9-2e16-7661-0efd-cae7ef1067e7@linaro.org>
Date:   Wed, 12 Oct 2022 10:34:40 -0400
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Marcin Wojtas <mw@...ihalf.com>
Cc:     MichaƂ Grzelak <mig@...ihalf.com>,
        devicetree@...r.kernel.org, linux@...linux.org.uk,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, upstream@...ihalf.com
Subject: Re: [PATCH v3 1/3] dt-bindings: net: marvell,pp2: convert to
 json-schema

On 11/10/2022 19:01, Marcin Wojtas wrote:
,
>>
>> ethernet@
>> {
>>     ethernet-port@0
>>     {
>>      }
>>      ethernet-port@1
>>      {
>>      }
>> }
>>
>> What do you recommend?
>>
> 
> I moved the ethernet-controller.yaml reference to under the subnode
> (this allowed me to remove phy and phy-mode description)) and it
> doesn't complain about the node naming. Please let me know if below
> would be acceptable.
> 
> --- a/Documentation/devicetree/bindings/net/marvell,pp2.yaml
> +++ b/Documentation/devicetree/bindings/net/marvell,pp2.yaml
> @@ -61,7 +61,11 @@ patternProperties:
>      type: object
>      description: subnode for each ethernet port.
> 
> +    allOf:

Skip the allOf, just $ref is enough.

> +      - $ref: ethernet-controller.yaml#
> +
>      properties:
>        interrupts:
>          minItems: 1
>          maxItems: 10
> @@ -95,19 +99,11 @@ patternProperties:
> 
>        port-id:
>          $ref: /schemas/types.yaml#/definitions/uint32
> +        deprecated: true
>          description: >
>            ID of the port from the MAC point of view.
>            Legacy binding for backward compatibility.
> 
> -      phy:
> -        $ref: /schemas/types.yaml#/definitions/phandle
> -        description: >
> -          a phandle to a phy node defining the PHY address
> -          (as the reg property, a single integer).
> -
> -      phy-mode:
> -        $ref: ethernet-controller.yaml#/properties/phy-mode
> -
>        marvell,loopback:
>          $ref: /schemas/types.yaml#/definitions/flag
>          description: port is loopback mode.
> @@ -132,7 +128,6 @@ required:
>    - clock-names
> 
>  allOf:
> -  - $ref: ethernet-controller.yaml#
>    - if:
> 

Yes, except:

1. top-level (so with no indentation) unevaluatedProperties: false
should be now additionalProperties: false.
2. You need unevaluatedProperties here:

+    type: object
+    description: subnode for each ethernet port.
+    $ref: ethernet-controller.yaml#
+    unevaluatedProperties: false

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ