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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 May 2022 10:02:45 +0200
From:   Frank Wunderlich <frank-w@...lic-files.de>
To:     Rob Herring <robh@...nel.org>
Cc:     Frank Wunderlich <linux@...web.de>,
        linux-rockchip@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Heiko Stuebner <heiko@...ech.de>,
        Sean Wang <sean.wang@...iatek.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        DENG Qingfang <dqfext@...il.com>,
        Peter Geis <pgwipeout@...il.com>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Greg Ungerer <gerg@...nel.org>,
        René van Dorst <opensource@...rst.com>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
Subject: Aw: Re: [PATCH v3 1/6] dt-bindings: net: dsa: convert binding for
 mediatek switches

Hi

thanks for review

> Gesendet: Dienstag, 10. Mai 2022 um 20:44 Uhr
> Von: "Rob Herring" <robh@...nel.org>
> On Sat, May 07, 2022 at 07:04:35PM +0200, Frank Wunderlich wrote:
> > From: Frank Wunderlich <frank-w@...lic-files.de>

> > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml

> > +properties:
> > +  compatible:
> > +    enum:
> > +      - mediatek,mt7530
> > +      - mediatek,mt7531
> > +      - mediatek,mt7621
> > +
>
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 0
>
> I don't see any child nodes with addresses, so these can be removed.

dropping this (and address-cells/size-cells from examples) causes errors like this (address-/size-cells set in mdio
node, so imho it should inherite):

Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.example.dts:34.25-35: Warning (reg_format):
/example-0/mdio/switch@...orts/port@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.example.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'

> > +  interrupt-controller:
> > +    type: boolean
>
> Already has a type. Just:
>
> interrupt-controller: true
>
> > +
> > +  interrupts:
> > +    maxItems: 1

> > +patternProperties:
> > +  "^(ethernet-)?ports$":
> > +    type: object
>
>        additionalProperties: false

imho this will block address-/size-cells from this level too. looks like it is needed here too (for port-regs).

> > +
> > +    patternProperties:
> > +      "^(ethernet-)?port@[0-9]+$":
> > +        type: object
> > +        description: Ethernet switch ports
> > +
> > +        unevaluatedProperties: false
> > +
> > +        properties:
> > +          reg:
> > +            description:
> > +              Port address described must be 5 or 6 for CPU port and from 0
> > +              to 5 for user ports.
> > +
> > +        allOf:
> > +          - $ref: dsa-port.yaml#
> > +          - if:
> > +              properties:
> > +                label:
> > +                  items:
> > +                    - const: cpu
> > +            then:
> > +              required:
> > +                - reg
> > +                - phy-mode
> > +

> > +  - if:
> > +      required:
> > +        - interrupt-controller
> > +    then:
> > +      required:
> > +        - interrupts
>
> This can be expressed as:
>
> dependencies:
>   interrupt-controller: [ interrupts ]

ok, i will change this

> > +            ports {
>
> Use the preferred form: ethernet-ports

current implementation in all existing dts and examples from old binding are "ports" only.
should they changed too?

> > +                #address-cells = <1>;
> > +                #size-cells = <0>;
> > +                port@0 {

regards Frank

Powered by blists - more mailing lists