Message ID | 20221127224734.885526-5-colin.foster@in-advantage.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | dt-binding preparation for ocelot switches | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next |
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 15 of 15 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/check_selftest | success | No net selftest shell script |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 lines checked |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
On 11/27/22 14:47, Colin Foster wrote: > Explicitly allow additional properties for both the ethernet-port and > ethernet-ports properties. This specifically will allow the qca8k.yaml > binding to use shared properties. > > Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
On Sun, Nov 27, 2022 at 02:47:28PM -0800, Colin Foster wrote: > Explicitly allow additional properties for both the ethernet-port and > ethernet-ports properties. This specifically will allow the qca8k.yaml > binding to use shared properties. > > Signed-off-by: Colin Foster <colin.foster@in-advantage.com> > --- > > v2 -> v3 > * No change > > v1 -> v2 > * New patch > > --- > Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > index bd1f0f7c14a8..87475c2ab092 100644 > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > @@ -38,6 +38,8 @@ patternProperties: > '#size-cells': > const: 0 > > + additionalProperties: true > + Where then do we restrict adding properties to ethernet-ports nodes? > patternProperties: > "^(ethernet-)?port@[0-9]+$": > type: object > @@ -45,7 +47,7 @@ patternProperties: > > $ref: dsa-port.yaml# > > - unevaluatedProperties: false > + unevaluatedProperties: true Same question for ethernet-port nodes. > > oneOf: > - required: > -- > 2.25.1 > >
On Mon, Nov 28, 2022 at 05:27:59PM -0600, Rob Herring wrote: > On Sun, Nov 27, 2022 at 02:47:28PM -0800, Colin Foster wrote: > > Explicitly allow additional properties for both the ethernet-port and > > ethernet-ports properties. This specifically will allow the qca8k.yaml > > binding to use shared properties. > > > > Signed-off-by: Colin Foster <colin.foster@in-advantage.com> > > --- > > > > v2 -> v3 > > * No change > > > > v1 -> v2 > > * New patch > > > > --- > > Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > index bd1f0f7c14a8..87475c2ab092 100644 > > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > @@ -38,6 +38,8 @@ patternProperties: > > '#size-cells': > > const: 0 > > > > + additionalProperties: true > > + > > Where then do we restrict adding properties to ethernet-ports nodes? > > > patternProperties: > > "^(ethernet-)?port@[0-9]+$": > > type: object > > @@ -45,7 +47,7 @@ patternProperties: > > > > $ref: dsa-port.yaml# > > > > - unevaluatedProperties: false > > + unevaluatedProperties: true > > Same question for ethernet-port nodes. For ethernet-port nodes, the qca8k has unevaluatedProperties: false. But the fact that you're asking this question means I probably misunderstood something... For the ethernet-ports node, I'm curious if my other follow-up answers that question where I realized dsa.yaml should, under the base definition, have additionalPrpoerties: false. But again, my guess is that isn't the case. > > > > > oneOf: > > - required: > > -- > > 2.25.1 > > > >
On Mon, Nov 28, 2022 at 11:21:18PM -0800, Colin Foster wrote: > On Mon, Nov 28, 2022 at 05:27:59PM -0600, Rob Herring wrote: > > On Sun, Nov 27, 2022 at 02:47:28PM -0800, Colin Foster wrote: > > > Explicitly allow additional properties for both the ethernet-port and > > > ethernet-ports properties. This specifically will allow the qca8k.yaml > > > binding to use shared properties. > > > > > > Signed-off-by: Colin Foster <colin.foster@in-advantage.com> > > > --- > > > > > > v2 -> v3 > > > * No change > > > > > > v1 -> v2 > > > * New patch > > > > > > --- > > > Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > > index bd1f0f7c14a8..87475c2ab092 100644 > > > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > > > @@ -38,6 +38,8 @@ patternProperties: > > > '#size-cells': > > > const: 0 > > > > > > + additionalProperties: true > > > + > > > > Where then do we restrict adding properties to ethernet-ports nodes? > > > > > patternProperties: > > > "^(ethernet-)?port@[0-9]+$": > > > type: object > > > @@ -45,7 +47,7 @@ patternProperties: > > > > > > $ref: dsa-port.yaml# > > > > > > - unevaluatedProperties: false > > > + unevaluatedProperties: true > > > > Same question for ethernet-port nodes. > > For ethernet-port nodes, the qca8k has unevaluatedProperties: false. But > the fact that you're asking this question means I probably misunderstood > something... The above is the case where you aren't adding extra properties (IIRC), so 'unevaluatedProperties: false' should be correct. 'unevaluatedProperties: true' is never correct in bindings. If you ref a schema that sets it to true, you can't override it. So qca8k, should reference dsa-port.yaml, define its extra properties and set 'unevaluatedProperties: false'. > For the ethernet-ports node, I'm curious if my other follow-up answers > that question where I realized dsa.yaml should, under the base > definition, have additionalPrpoerties: false. But again, my guess is > that isn't the case. That one looks correct. Rob
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml index bd1f0f7c14a8..87475c2ab092 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml @@ -38,6 +38,8 @@ patternProperties: '#size-cells': const: 0 + additionalProperties: true + patternProperties: "^(ethernet-)?port@[0-9]+$": type: object @@ -45,7 +47,7 @@ patternProperties: $ref: dsa-port.yaml# - unevaluatedProperties: false + unevaluatedProperties: true oneOf: - required:
Explicitly allow additional properties for both the ethernet-port and ethernet-ports properties. This specifically will allow the qca8k.yaml binding to use shared properties. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> --- v2 -> v3 * No change v1 -> v2 * New patch --- Documentation/devicetree/bindings/net/dsa/dsa.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)