Skip to contentSkip to conversation

riscv: dts: renesas: clean up dtbs_check W=1 warning due to empty phy node

PATCH In review Conor Dooley 3 participants 4 messages Jul 12, 2023

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

PATCH 1/1 riscv: dts: renesas: clean up dtbs_check W=1 warning due to empty phy node

dtbs_check w/ W=1 complains:
Warning (unit_address_vs_reg): /soc/ethernet@11c20000/ethernet-phy@7: node has a unit name, but no reg or ranges property Warning (avoid_unnecessary_addr_size): /soc/ethernet@11c20000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

The ethernet@11c20000 node is guarded by an #if (!SW_ET0_EN_N) in rzg2ul-smarc-som.dtsi, where the phy child node is added. In rzfive-smarc-som.dtsi, the ethernet node is marked disabled & the interrupt properties are deleted from the phy child node. As a result, the produced dts looks like:

	ethernet@11c20000 {
		compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
		/* snip */
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "disabled";

		ethernet-phy@7 {
		};
	};

Adding a corresponding #if (!SW_ET0_EN_N) around the node in rzfive-smarc-som.dtsi avoids the complaint, as the empty child node is not added:

	ethernet@11c20000 {
		compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
		/* snip */
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "disabled";
	};

---
CC: Geert Uytterhoeven <[email protected]>
CC: Magnus Damm <[email protected]>
CC: Prabhakar Mahadev Lad <[email protected]>
CC: Rob Herring <[email protected]>
CC: Krzysztof Kozlowski <[email protected]>
CC: Conor Dooley <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +2 -0
index d6f18754eb5d..c62debc7ca7e 100644
@@ -22,6 +22,7 @@ &dmac {
 	status = "disabled";
 };
 
+#if (!SW_ET0_EN_N)
 &eth0 {
 	status = "disabled";
 
@@ -30,6 +31,7 @@ phy0: ethernet-phy@7 {
 		/delete-property/ interrupts;
 	};
 };
+#endif
 
 &eth1 {
 	status = "disabled";
Signature · 7 lines
2.40.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#1 lore raw

Hello!

Quoted 32 lines · Conor Dooley

dtbs_check w/ W=1 complains:
Warning (unit_address_vs_reg): /soc/ethernet@11c20000/ethernet-phy@7: node has a unit name, but no reg or ranges property Warning (avoid_unnecessary_addr_size): /soc/ethernet@11c20000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

The ethernet@11c20000 node is guarded by an #if (!SW_ET0_EN_N) in rzg2ul-smarc-som.dtsi, where the phy child node is added. In rzfive-smarc-som.dtsi, the ethernet node is marked disabled & the interrupt properties are deleted from the phy child node. As a result, the produced dts looks like:

	ethernet@11c20000 {
		compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
		/* snip */
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "disabled";

		ethernet-phy@7 {
		};
	};

Adding a corresponding #if (!SW_ET0_EN_N) around the node in rzfive-smarc-som.dtsi avoids the complaint, as the empty child node is not added:

	ethernet@11c20000 {
		compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
		/* snip */
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "disabled";
	};

[...]

arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi &dmac { · line 25

Quoted 9 lines
arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +1 -0
index d6f18754eb5d..c62debc7ca7e 100644
@@ -22,6 +22,7 @@ &dmac {
 	status = "disabled";
 };
 
+#if (!SW_ET0_EN_N)

Are the parens really needed here?

arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi &dmac { · line 28

Quoted 3 lines
arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +0 -0
 &eth0 {
 	status = "disabled";
 

[...]

MBR, Sergey

#2 lore raw

Hi Sergei.

Quoted 44 lines · Sergei Shtylyov
Quoted 32 lines · Conor Dooley

dtbs_check w/ W=1 complains:
Warning (unit_address_vs_reg): /soc/ethernet@11c20000/ethernet-phy@7: node has a unit name, but no reg or ranges property Warning (avoid_unnecessary_addr_size): /soc/ethernet@11c20000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

The ethernet@11c20000 node is guarded by an #if (!SW_ET0_EN_N) in rzg2ul-smarc-som.dtsi, where the phy child node is added. In rzfive-smarc-som.dtsi, the ethernet node is marked disabled & the interrupt properties are deleted from the phy child node. As a result, the produced dts looks like:

      ethernet@11c20000 {
              compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
              /* snip */
              #address-cells = <0x01>;
              #size-cells = <0x00>;
              status = "disabled";

              ethernet-phy@7 {
              };
      };

Adding a corresponding #if (!SW_ET0_EN_N) around the node in rzfive-smarc-som.dtsi avoids the complaint, as the empty child node is not added:

      ethernet@11c20000 {
              compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
              /* snip */
              #address-cells = <0x01>;
              #size-cells = <0x00>;
              status = "disabled";
      };

[...]

Quoted 8 lines
arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +0 -0
index d6f18754eb5d..c62debc7ca7e 100644
@@ -22,6 +22,7 @@ &dmac {
      status = "disabled";
 };
 
Quoted 3 lines

arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi &dmac { · line 25

Quoted 1 line
arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +1 -0
+#if (!SW_ET0_EN_N)

Are the parens really needed here?

No they aren't. But this follows the existing style of the other users.

Quoted 5 lines
Quoted 4 lines
arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi +0 -0
 &eth0 {
      status = "disabled";
 

[...]

Gr{oetje,eeting}s,

Geert

Signature · 10 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by on v1 1/1
#3 lore raw
In reply to Conor Dooley
Quoted 31 lines · Conor Dooley

dtbs_check w/ W=1 complains:
Warning (unit_address_vs_reg): /soc/ethernet@11c20000/ethernet-phy@7: node has a unit name, but no reg or ranges property Warning (avoid_unnecessary_addr_size): /soc/ethernet@11c20000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

The ethernet@11c20000 node is guarded by an #if (!SW_ET0_EN_N) in rzg2ul-smarc-som.dtsi, where the phy child node is added. In rzfive-smarc-som.dtsi, the ethernet node is marked disabled & the interrupt properties are deleted from the phy child node. As a result, the produced dts looks like:

        ethernet@11c20000 {
                compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
                /* snip */
                #address-cells = <0x01>;
                #size-cells = <0x00>;
                status = "disabled";

                ethernet-phy@7 {
                };
        };

Adding a corresponding #if (!SW_ET0_EN_N) around the node in rzfive-smarc-som.dtsi avoids the complaint, as the empty child node is not added:

        ethernet@11c20000 {
                compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
                /* snip */
                #address-cells = <0x01>;
                #size-cells = <0x00>;
                status = "disabled";
        };
Quoted 1 line

i.e. will queue in renesas-devel for v6.6.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds