Skip to contentSkip to conversation

dt-bindings: net: dsa: Fix realtek-smi example

PATCH In review Florian Fainelli 5 participants 6 messages Dec 23, 2021 – Jan 5, 2022

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

PATCH 1/1 dt-bindings: net: dsa: Fix realtek-smi example

The 'ports' node is not supposed to have a 'reg' property at all, in fact, doing so will lead to dtc issuing warnings looking like these:

arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:109.4-14: Warning (reg_format): /switch/ports:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #address-cells value arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #size-cells value

Fix the example by remove the stray 'reg' property.

Fixes 3b3b6b460f78 ("net: dsa: Add bindings for Realtek SMI DSAs")
---
 Documentation/devicetree/bindings/net/dsa/realtek-smi.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/devicetree/bindings/net/dsa/realtek-smi.txt +1 -2
index 7959ec237983..a8d0f1febe32 100644
@@ -84,7 +84,6 @@ switch {
 	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		reg = <0>;
 		port@0 {
 			reg = <0>;
 			label = "lan0";
@@ -174,7 +173,7 @@ switch {
 	ports {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		reg = <0>;
+
 		port@0 {
 			reg = <0>;
 			label = "swp0";
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Florian Fainelli

The 'ports' node is not supposed to have a 'reg' property at all, in fact, doing so will lead to dtc issuing warnings looking like these:

arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:109.4-14: Warning (reg_format): /switch/ports:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #address-cells value arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #size-cells value

Quoted 5 lines

Fix the example by remove the stray 'reg' property.

Fixes 3b3b6b460f78 ("net: dsa: Add bindings for Realtek SMI DSAs")

Andrew

Reviewed-by on v1 1/1
#2 lore raw
In reply to Florian Fainelli
Quoted 11 lines · Florian Fainelli

The 'ports' node is not supposed to have a 'reg' property at all, in fact, doing so will lead to dtc issuing warnings looking like these:

arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:109.4-14: Warning (reg_format): /switch/ports:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format' arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #address-cells value arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts:106.9-149.5: Warning (avoid_default_addr_size): /switch/ports: Relying on default #size-cells value

Quoted 5 lines

Fix the example by remove the stray 'reg' property.

Fixes 3b3b6b460f78 ("net: dsa: Add bindings for Realtek SMI DSAs")

Ooops thanks for fixing this! (Wouldn't happen if we converted it to YAML...)

Yours,
Linus Walleij

maintainer
#4 lore raw
Quoted 4 lines · Luiz Angelo Daros de Luca
Quoted 2 lines

Ooops thanks for fixing this! (Wouldn't happen if we converted it to YAML...)

I'm working on it. I might post it in a couple of days.

Then just fix this in the conversion.

Quoted 6 lines
Quoted 5 lines

Yours,
Linus Walleij

#5 lore raw
Quoted 1 line

Then just fix this in the conversion.

Hi Rob,

I'm not sure if I got your suggestion. Should I post the new patch in-reply to this thread?
It is related but something completely different.

I sent YAML conversion v1 a little while ago.
https://lore.kernel.org/netdev/[email protected]/

I'll send v2 soon. I'll mention it in this thread when I do it.

Best,

Luiz