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]
Date:   Thu, 29 Dec 2022 09:24:11 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Michał Grzelak <mig@...ihalf.com>
Cc:     andrew@...n.ch, chris.packham@...iedtelesis.co.nz,
        davem@...emloft.net, devicetree@...r.kernel.org,
        edumazet@...gle.com, krzysztof.kozlowski+dt@...aro.org,
        kuba@...nel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, pabeni@...hat.com, robh+dt@...nel.org,
        upstream@...ihalf.com
Subject: Re: [PATCH v2] dt-bindings: net: marvell,orion-mdio: Fix examples

On 28/12/2022 02:54, Michał Grzelak wrote:
> As stated in marvell-orion-mdio.txt deleted in commit 0781434af811f
> ("dt-bindings: net: orion-mdio: Convert to JSON schema") if
> 'interrupts' property is present, width of 'reg' should be 0x84.
> Otherwise, width of 'reg' should be 0x4. Fix 'examples:' and add
> constraints checking whether 'interrupts' property is present
> and validate it against fixed values in reg.
> 
> Signed-off-by: Michał Grzelak <mig@...ihalf.com>
> ---
> Changelog:
> v1->v2:
> - remove second example
> - add 'if:' constraint to 'allOf:'
> - move 'allOf:' before 'examples:'
> 
>  .../bindings/net/marvell,orion-mdio.yaml      | 31 ++++++++++++++++---
>  1 file changed, 27 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml b/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
> index d2906b4a0f59..381cd8edebed 100644
> --- a/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
> +++ b/Documentation/devicetree/bindings/net/marvell,orion-mdio.yaml
> @@ -16,9 +16,6 @@ description: |
>    8k has a second unit which provides an interface with the xMDIO bus. This
>    driver handles these interfaces.
>  
> -allOf:
> -  - $ref: "mdio.yaml#"
> -
>  properties:
>    compatible:
>      enum:
> @@ -39,13 +36,39 @@ required:
>    - compatible
>    - reg
>  
> +allOf:
> +

Drop blank line.

> +  - $ref: "mdio.yaml#"

Drop quotes while moving it.

> +
> +  - if:
> +      required:
> +        - interrupts
> +
> +    then:
> +      properties:
> +        reg:
> +          items:
> +            - items:
> +                - $ref: /schemas/types.yaml#/definitions/cell
> +                - const: 0x84
> +
> +    else:
> +      properties:
> +        reg:
> +          items:
> +            - items:
> +                - $ref: /schemas/types.yaml#/definitions/cell
> +                - enum:
> +                    - 0x4
> +                    - 0x10

Rest looks good.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ