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: <CAMuHMdW+LKEWiygOb40mGDuLBucyF-xLcBgreA=txivGmjzdig@mail.gmail.com>
Date:   Tue, 9 Mar 2021 13:56:57 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Rob Herring <robh@...nel.org>
Cc:     Geert Uytterhoeven <geert+renesas@...der.be>,
        Magnus Damm <magnus.damm@...il.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux PM list <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [RFC] dt-bindings: power: sysc-remobile: Convert to json-schema

Hi Rob,

On Tue, Feb 9, 2021 at 8:20 PM Rob Herring <robh@...nel.org> wrote:
> On Wed, Jan 27, 2021 at 02:28:40PM +0100, Geert Uytterhoeven wrote:
> > Convert the Renesas R-Mobile System Controller (SYSC) Device Tree
> > binding documentation to json-schema.
> >
> > Document missing properties.
> > Drop consumer example, as it does not belong here.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > ---
> > Marked RFC, as it does not check deeper levels than the first level of
> > the "pm-domains" subnode.
> >
> > I think the reference in
> >
> >     additionalProperties:
> >       $ref: "#/patternProperties"
> >
> > should become "#/patternProperties/0/additionalProperties", but that
> > gives:
> >
> >     Unresolvable JSON pointer: 'patternProperties/0/additionalProperties'
>
> AFAIK, numbers only work on lists (such as 'allOf' values). So I think
> you'd want '#/patternProperties/^pm-domains$/additionalProperties'.
> However, regex's can have illegal characters. I think URI escaping them
> would work, but that gets too readable and unmaintainable for my tastes.
> The other way to do this is put the schema under a '$defs'. But in your
> case, you have just a fixed string, so there's no need for it to be a
> pattern. Just move it to 'properties'.

Thank you, I've dropped the patternProperties/regex, and moved the
section to properties.

The result fails with:

    Documentation/devicetree/bindings/power/renesas,sysc-rmobile.example.dt.yaml:
system-controller@...80000: pm-domains:c5:a4s@10: missing phandle tag
in {'reg': [[10]], '#address-cells': [[1]], '#size-cells': [[0]],
'#power-domain-cells': [[0]], 'a3sp@11': {'reg': [[11]],
'#power-domain-cells': [[0]]}}
    From schema:
Documentation/devicetree/bindings/power/renesas,sysc-rmobile.yaml
    Documentation/devicetree/bindings/power/renesas,sysc-rmobile.example.dt.yaml:
system-controller@...80000: pm-domains:c5:a4su@20: missing phandle tag
in {'reg': [[20]], '#power-domain-cells': [[0]]}
    From schema:
Documentation/devicetree/bindings/power/renesas,sysc-rmobile.yaml

Looking at Documentation/devicetree/bindings/power/renesas,sysc-rmobile.example.dt.yaml
there's indeed no "phandle: [[0x1]]" generated, while there is in
Documentation/devicetree/bindings/power/renesas,rcar-sysc.example.dt.yaml.

Reading other responses from you, that error means that "phandle-array"
should be used instead of "phandle".  The only question is where?

Thanks again!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ