diff mbox series

[net-next,v3,3/6] dt-bindings: net: mvusb: Fix up DSA example

Message ID 20231016-marvell-88e6152-wan-led-v3-3-38cd449dfb15@linaro.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Create a binding for the Marvell MV88E6xxx DSA switches | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers warning 1 maintainers not CCed: tobias@waldekranz.com
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
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: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Linus Walleij Oct. 16, 2023, 9:12 a.m. UTC
When adding a proper schema for the Marvell mx88e6xxx switch,
the scripts start complaining about this embedded example:

  dtschema/dtc warnings/errors:
  net/marvell,mvusb.example.dtb: switch@0: ports: '#address-cells'
  is a required property
  from schema $id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml#
  net/marvell,mvusb.example.dtb: switch@0: ports: '#size-cells'
  is a required property
  from schema $id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml#

Fix this up by extending the example.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/devicetree/bindings/net/marvell,mvusb.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Vladimir Oltean Oct. 16, 2023, 12:03 p.m. UTC | #1
On Mon, Oct 16, 2023 at 11:12:56AM +0200, Linus Walleij wrote:
> When adding a proper schema for the Marvell mx88e6xxx switch,
> the scripts start complaining about this embedded example:
> 
>   dtschema/dtc warnings/errors:
>   net/marvell,mvusb.example.dtb: switch@0: ports: '#address-cells'
>   is a required property
>   from schema $id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml#
>   net/marvell,mvusb.example.dtb: switch@0: ports: '#size-cells'
>   is a required property
>   from schema $id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml#
> 
> Fix this up by extending the example.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  Documentation/devicetree/bindings/net/marvell,mvusb.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/marvell,mvusb.yaml b/Documentation/devicetree/bindings/net/marvell,mvusb.yaml
> index 3a3325168048..ee677cf7df4e 100644
> --- a/Documentation/devicetree/bindings/net/marvell,mvusb.yaml
> +++ b/Documentation/devicetree/bindings/net/marvell,mvusb.yaml
> @@ -56,6 +56,12 @@ examples:
>  
>                              ports {
>                                      /* Port definitions */
> +                                    #address-cells = <1>;
> +                                    #size-cells = <0>;
> +
> +                                    port@0 {
> +                                            reg = <0>;
> +                                    };

Could you just skip defining any port, and just leave the /* Port definitions */
comment at the end (after the newly added #address-cells and #size-cells)?
This example is more about the USB adapter, not about the switch.

>                              };
>  
>                              mdio {
> 
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/marvell,mvusb.yaml b/Documentation/devicetree/bindings/net/marvell,mvusb.yaml
index 3a3325168048..ee677cf7df4e 100644
--- a/Documentation/devicetree/bindings/net/marvell,mvusb.yaml
+++ b/Documentation/devicetree/bindings/net/marvell,mvusb.yaml
@@ -56,6 +56,12 @@  examples:
 
                             ports {
                                     /* Port definitions */
+                                    #address-cells = <1>;
+                                    #size-cells = <0>;
+
+                                    port@0 {
+                                            reg = <0>;
+                                    };
                             };
 
                             mdio {