diff mbox

[10/18] ARM64: dts: meson-gxbb: Reorder nodes

Message ID 20170120222118.21476-11-afaerber@suse.de (mailing list archive)
State Changes Requested
Headers show

Commit Message

Andreas Färber Jan. 20, 2017, 10:21 p.m. UTC
Sort nodes referenced by label alphabetically.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 76 ++++++++++++++---------------
 1 file changed, 38 insertions(+), 38 deletions(-)

Comments

Rob Herring (Arm) Jan. 23, 2017, 4:52 p.m. UTC | #1
On Fri, Jan 20, 2017 at 11:21:10PM +0100, Andreas Färber wrote:
> Sort nodes referenced by label alphabetically.

Seems to be pointless churn.

> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 76 ++++++++++++++---------------
>  1 file changed, 38 insertions(+), 38 deletions(-)
Andreas Färber Jan. 23, 2017, 4:56 p.m. UTC | #2
Am 23.01.2017 um 17:52 schrieb Rob Herring:
> On Fri, Jan 20, 2017 at 11:21:10PM +0100, Andreas Färber wrote:
>> Sort nodes referenced by label alphabetically.
> 
> Seems to be pointless churn.

We are constantly adding new nodes, so this avoids duplicates, mismerges
and uncertainties of where things should be added. Thought that would be
obvious, as I've been asked to do it elsewhere.

It also helps with diff -u'ing .dts files to see actual differences.

Regards,
Andreas
Russell King (Oracle) Jan. 30, 2017, 2:59 p.m. UTC | #3
On Mon, Jan 23, 2017 at 10:52:08AM -0600, Rob Herring wrote:
> On Fri, Jan 20, 2017 at 11:21:10PM +0100, Andreas Färber wrote:
> > Sort nodes referenced by label alphabetically.
> 
> Seems to be pointless churn.

Depends - if, as the author of a dts file, I order the nodes
alphabetically, and then someone comes along and adds a new node
non-alphabetically, meanwhile someone else also adds a node
elsewhere in the file which conflicts, git will silently merge the
changes without complaint.

Having an alphabetical sorting order means that (a) conflicting
changes are more likely to be highlighted, and (b) non-conflicting
changes are less likely to cause merge issues.

I've noticed exactly this with clearfog when merging my tree with
arm-soc.  I have a version of the DSA patch, meanwhile the mvebu
people merged the DSA patch.  Somehow, the order of nodes in my
file are alphabetical, the order in their file has the pinctrl and
mdio nodes swapped, which results in totally unnecessary merge
conflicts when I try merging the two trees.

It's more, unnecessary work.

So, I'm going to be submitting a patch to fix the mis-ordered nodes
in the clearfog dts file today to avoid having to resolve this each
time I rebuild my nightly build tree.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 39a774ad83ce..5c22c794ed95 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -97,24 +97,6 @@ 
 	};
 };
 
-&cbus {
-	spifc: spi@8c80 {
-		compatible = "amlogic,meson-gxbb-spifc";
-		reg = <0x0 0x08c80 0x0 0x80>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		clocks = <&clkc CLKID_SPI>;
-		status = "disabled";
-	};
-};
-
-&ethmac {
-	clocks = <&clkc CLKID_ETH>,
-		 <&clkc CLKID_FCLK_DIV2>,
-		 <&clkc CLKID_MPLL2>;
-	clock-names = "stmmaceth", "clkin0", "clkin1";
-};
-
 &aobus {
 	pinctrl_aobus: pinctrl@14 {
 		compatible = "amlogic,meson-gxbb-aobus-pinctrl";
@@ -230,6 +212,44 @@ 
 	};
 };
 
+&cbus {
+	spifc: spi@8c80 {
+		compatible = "amlogic,meson-gxbb-spifc";
+		reg = <0x0 0x08c80 0x0 0x80>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		clocks = <&clkc CLKID_SPI>;
+		status = "disabled";
+	};
+};
+
+&ethmac {
+	clocks = <&clkc CLKID_ETH>,
+		 <&clkc CLKID_FCLK_DIV2>,
+		 <&clkc CLKID_MPLL2>;
+	clock-names = "stmmaceth", "clkin0", "clkin1";
+};
+
+&hiubus {
+	clkc: clock-controller@0 {
+		compatible = "amlogic,gxbb-clkc";
+		#clock-cells = <1>;
+		reg = <0x0 0x0 0x0 0x3db>;
+	};
+};
+
+&i2c_A {
+	clocks = <&clkc CLKID_I2C>;
+};
+
+&i2c_B {
+	clocks = <&clkc CLKID_I2C>;
+};
+
+&i2c_C {
+	clocks = <&clkc CLKID_I2C>;
+};
+
 &periphs {
 	pinctrl_periphs: pinctrl@4b0 {
 		compatible = "amlogic,meson-gxbb-periphs-pinctrl";
@@ -470,26 +490,6 @@ 
 	};
 };
 
-&hiubus {
-	clkc: clock-controller@0 {
-		compatible = "amlogic,gxbb-clkc";
-		#clock-cells = <1>;
-		reg = <0x0 0x0 0x0 0x3db>;
-	};
-};
-
-&i2c_A {
-	clocks = <&clkc CLKID_I2C>;
-};
-
-&i2c_B {
-	clocks = <&clkc CLKID_I2C>;
-};
-
-&i2c_C {
-	clocks = <&clkc CLKID_I2C>;
-};
-
 &sd_emmc_a {
 	clocks = <&clkc CLKID_SD_EMMC_A>,
 		 <&xtal>,