All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells
@ 2018-05-07 12:17 Fabio Estevam
  2018-05-08 16:53 ` Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-05-07 12:17 UTC (permalink / raw)
  To: davem; +Cc: f.fainelli, andrew, robh+dt, netdev, devicetree, Fabio Estevam

From: Fabio Estevam <fabio.estevam@nxp.com>

If the example binding is used on a real dts file, the following DTC
warning is seen with W=1:
    
arch/arm/boot/dts/imx6q-b450v3.dtb: Warning (avoid_unnecessary_addr_size): /mdio-gpio/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Remove unnecessary #address-cells/#size-cells to improve the binding
document examples.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 Documentation/devicetree/bindings/net/dsa/dsa.txt | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindings/net/dsa/dsa.txt
index cfe8f64..3ceeb8d 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.txt
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.txt
@@ -82,8 +82,6 @@ linked into one DSA cluster.
 
 	switch0: switch0@0 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0>;
 
 		dsa,member = <0 0>;
@@ -135,8 +133,6 @@ linked into one DSA cluster.
 
 	switch1: switch1@0 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0>;
 
 		dsa,member = <0 1>;
@@ -204,8 +200,6 @@ linked into one DSA cluster.
 
 	switch2: switch2@0 {
 		compatible = "marvell,mv88e6085";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0>;
 
 		dsa,member = <0 2>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells
  2018-05-07 12:17 [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells Fabio Estevam
@ 2018-05-08 16:53 ` Rob Herring
  2018-05-08 20:58 ` Florian Fainelli
  2018-05-09  0:28 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2018-05-08 16:53 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: davem, f.fainelli, andrew, netdev, devicetree, Fabio Estevam

On Mon, May 07, 2018 at 09:17:51AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> If the example binding is used on a real dts file, the following DTC
> warning is seen with W=1:
>     
> arch/arm/boot/dts/imx6q-b450v3.dtb: Warning (avoid_unnecessary_addr_size): /mdio-gpio/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> Remove unnecessary #address-cells/#size-cells to improve the binding
> document examples.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  Documentation/devicetree/bindings/net/dsa/dsa.txt | 6 ------
>  1 file changed, 6 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells
  2018-05-07 12:17 [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells Fabio Estevam
  2018-05-08 16:53 ` Rob Herring
@ 2018-05-08 20:58 ` Florian Fainelli
  2018-05-09  0:28 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2018-05-08 20:58 UTC (permalink / raw)
  To: Fabio Estevam, davem; +Cc: andrew, robh+dt, netdev, devicetree, Fabio Estevam

On 05/07/2018 05:17 AM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> If the example binding is used on a real dts file, the following DTC
> warning is seen with W=1:
>     
> arch/arm/boot/dts/imx6q-b450v3.dtb: Warning (avoid_unnecessary_addr_size): /mdio-gpio/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> Remove unnecessary #address-cells/#size-cells to improve the binding
> document examples.

In most cases this is unnecessary because the parent node is an MDIO,
I2C or SPI controller, and those typically have #address-cells = <1> and
#size-cells = <0> because of their specific binding, but this is not
necessarily true if using e.g: a MMIO mapped Ethernet switch.

With the particular example though, this appears fine:

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells
  2018-05-07 12:17 [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells Fabio Estevam
  2018-05-08 16:53 ` Rob Herring
  2018-05-08 20:58 ` Florian Fainelli
@ 2018-05-09  0:28 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-05-09  0:28 UTC (permalink / raw)
  To: festevam; +Cc: f.fainelli, andrew, robh+dt, netdev, devicetree, fabio.estevam

From: Fabio Estevam <festevam@gmail.com>
Date: Mon,  7 May 2018 09:17:51 -0300

> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> If the example binding is used on a real dts file, the following DTC
> warning is seen with W=1:
>     
> arch/arm/boot/dts/imx6q-b450v3.dtb: Warning (avoid_unnecessary_addr_size): /mdio-gpio/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> Remove unnecessary #address-cells/#size-cells to improve the binding
> document examples.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-09  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 12:17 [PATCH net-next] dt-bindings: dsa: Remove unnecessary #address/#size-cells Fabio Estevam
2018-05-08 16:53 ` Rob Herring
2018-05-08 20:58 ` Florian Fainelli
2018-05-09  0:28 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.