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]
Date:   Thu, 8 Apr 2021 20:28:08 +0800
From:   "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>
To:     Rob Herring <robh@...nel.org>
CC:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        alsa-devel <alsa-devel@...a-project.org>,
        devicetree <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Subject: Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning
 'ports' does not match any of the regexes



On 2021/4/7 10:04, Leizhen (ThunderTown) wrote:
> 
> 
> On 2021/4/2 4:20, Rob Herring wrote:
>> On Wed, Mar 31, 2021 at 05:16:16PM +0800, Zhen Lei wrote:
>>> Currently, if there are more than two ports, or if there is only one port
>>> but other properties(such as "#address-cells") is required, these ports
>>> are placed under the "ports" node. So add the schema of property "ports".
>>
>> A given binding should just use 'ports' or 'port' depending on it's 
>> need. Supporting both forms is needless complexity.

Hi Rob:
I don't think of a good way to avoid "port" and "ports" to be used at the same time.
Should I disable the use of "port"? Convert the two usages of "port" into "ports".
But usually no one will use both of them in one dts file. And even if it's used at
the same time, it's not a big mistake. So I decided not to test it.

> 
> Right, I'll adjust this patch again.
> 
>>
>>> Otherwise, warnings similar to the following will be reported:
>>> arch/arm64/boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dt.yaml: \
>>> sound@...00000: 'ports' does not match any of the regexes: \
>>> '^rcar_sound,ctu$', '^rcar_sound,dai$', '^rcar_sound,dvc$', ...
>>>
>>> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
>>> ---
>>>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
>>> index 384191ee497f534..a42992fa687d3f3 100644
>>> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
>>> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
>>> @@ -115,6 +115,11 @@ properties:
>>>      $ref: audio-graph-port.yaml#
>>>      unevaluatedProperties: false
>>>  
>>> +  ports:
>>
>>        $ref: /schemas/graph.yaml#/properties/ports
> 
> OK, thanks
> 
>>
>>> +    patternProperties:
>>> +      '^port@[0-9]':
>>> +        $ref: "#/properties/port"
>>
>> Then this should be: $ref: audio-graph-port.yaml#
> 
> OK, thanks
> 
>>
>> Also, what each port is should be defined, but that's a separate 
>> problem.
>>
>>> +
>>>  # use patternProperties to avoid naming "xxx,yyy" issue
>>>  patternProperties:
>>>    "^rcar_sound,dvc$":
>>> -- 
>>> 1.8.3
>>>
>>>
>>
>> .
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ