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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220420154611.7dd34c24@bootlin.com>
Date:   Wed, 20 Apr 2022 15:46:11 +0200
From:   Herve Codina <herve.codina@...tlin.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Marek Vasut <marek.vasut+renesas@...il.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Magnus Damm <magnus.damm@...il.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Krzysztof Wilczyński 
        <kw@...ux.com>, linux-pci@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Sergey Shtylyov <s.shtylyov@....ru>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Clement Leger <clement.leger@...tlin.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH v2 2/8] dt-bindings: PCI: renesas-pci-usb: Convert
 bindings to json-schema

Hi Rob,

On Wed, 20 Apr 2022 08:18:50 -0500
Rob Herring <robh@...nel.org> wrote:

...

> > > > +  bus-range:
> > > > +    description: |
> > > > +      The PCI bus number range; as this is a single bus, the range
> > > > +      should be specified as the same value twice.    
> > > 
> > > items:
> > >   const: 0  
> > 
> > Well, some other values are present in some dtsi files such as
> > 'bus_range = <1 1>;' or 'bus_range = <2 2>;' in r8a7742.dtsi.
> > 
> > The constraint is to have the same value twice. Is there a way
> > to specify this constraint ?  
> 
> Yes, but probably not worthwhile. Just drop it as pci-bus.yaml already 
> defines it.

Instead of fully dropping the property, don't you think that keeping
the given description here can be a way to express that the same value
is needed twice ?

> 
> > > > +
> > > > +  "#address-cells":
> > > > +    const: 3
> > > > +
> > > > +  "#size-cells":
> > > > +    const: 2
> > > > +
> > > > +  "#interrupt-cells":
> > > > +    const: 1    
> > > 
> > > All these are defined by pci-bus.yaml  
> > 
> > Right.
> > Replaced by:
> > 
> > "#address-cells": true
> > "#size-cells": true
> > "#interrupt-cells": true
> > 
> > Is that correct ?  
> 
> You can just drop them completely.

Ok for #address-cells and #size-cells but not for #interrupt-cells.

Dropping #interrupt-cells makes 'make dtbindings_check' unhappy:
--- 8< ---
$ make dt_binding_check DT_SCHEMA_FILES=renesas,pci-rcar-gen2.yaml
  LINT    Documentation/devicetree/bindings
  CHKDT   Documentation/devicetree/bindings/processed-schema.json
/home/hcodina/xxx/Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml: properties: '#interrupt-cells' is a dependency of 'interrupt-map'
	from schema $id: http://devicetree.org/meta-schemas/interrupts.yaml#
  SCHEMA  Documentation/devicetree/bindings/processed-schema.json
/home/hcodina/xxx/Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.yaml: ignoring, error in schema: properties
  DTEX    Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.example.dts
  DTC     Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.example.dtb
  CHECK   Documentation/devicetree/bindings/pci/renesas,pci-rcar-gen2.example.dtb
$ 
--- 8< ---

So I keep 
"#interrupt-cells": true

Regards,
Hervé

-- 
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ