Skip to contentSkip to conversation

dt-bindings: dsa: Remove unnecessary #address/#size-cells

PATCH Applied Fabio Estevam 4 participants 4 messages May 7, 2018 – May 9, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: dsa: Remove unnecessary #address/#size-cells

From: Fabio Estevam <[email protected]>

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.

---
 Documentation/devicetree/bindings/net/dsa/dsa.txt | 6 ------
 1 file changed, 6 deletions(-)
Documentation/devicetree/bindings/net/dsa/dsa.txt +0 -6
index cfe8f64..3ceeb8d 100644
@@ -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>;
Signature · 1 line
2.7.4
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Quoted 7 lines

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

---
 Documentation/devicetree/bindings/net/dsa/dsa.txt | 6 ------
 1 file changed, 6 deletions(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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:

Signature · 1 line
Florian
maintainer Applied
#3 lore raw
In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>
Date: Mon, 7 May 2018 09:17:51 -0300

Quoted 11 lines

From: Fabio Estevam <[email protected]>

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.

Applied, thank you.