ARM: dts: at91: Remove leading 0x and 0s from bindings notation
authorMathieu Malaterre <malat@debian.org>
Fri, 15 Dec 2017 12:46:26 +0000 (13:46 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sun, 31 Dec 2017 14:49:59 +0000 (15:49 +0100)
Improve the DTS files by removing all the leading "0x" and zeros to fix the
following dtc warnings:

Warning (unit_address_format): Node /XXX unit name should not have leading "0x"

and

Warning (unit_address_format): Node /XXX unit name should not have leading 0s

Converted using the following command:

find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -i -e "s/@\([0-9a-fA-FxX\.;:#]+\)\s*{/@\L\1 {/g" -e "s/@0x\(.*\) {/@\1 {/g" -e "s/@0+\(.*\) {/@\1 {/g" {} +^C

For simplicity, two sed expressions were used to solve each warnings separately.

To make the regex expression more robust a few other issues were resolved,
namely setting unit-address to lower case, and adding a whitespace before the
the opening curly brace:

https://elinux.org/Device_Tree_Linux#Linux_conventions

This will solve as a side effect warning:

Warning (simple_bus_reg): Node /XXX@<UPPER> simple-bus unit address format error, expected "<lower>"

This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation")

Reported-by: David Daney <ddaney@caviumnetworks.com>
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
arch/arm/boot/dts/at91sam9261.dtsi
arch/arm/boot/dts/at91sam9261ek.dts
arch/arm/boot/dts/at91sam9263.dtsi
arch/arm/boot/dts/at91sam9263ek.dts
arch/arm/boot/dts/at91sam9g25ek.dts
arch/arm/boot/dts/at91sam9g45.dtsi
arch/arm/boot/dts/at91sam9m10g45ek.dts
arch/arm/boot/dts/sama5d3xmb.dtsi
arch/arm/boot/dts/sama5d3xmb_cmp.dtsi

index 66876019101da789dc139420ebe4a80ec1541a18..eb186245fb4c6eb303386c94e45636a8df31ee98 100644 (file)
@@ -80,7 +80,7 @@
                        status = "disabled";
                };
 
-               fb0: fb@0x00600000 {
+               fb0: fb@600000 {
                        compatible = "atmel,at91sam9261-lcdc";
                        reg = <0x00600000 0x1000>;
                        interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
index 960d6940ebf656818e5a2cd4c32757d8f62e99e4..9733db3f739b028a397bbf50b97e5877678f03b7 100644 (file)
@@ -36,7 +36,7 @@
                        status = "okay";
                };
 
-               fb0: fb@0x00600000 {
+               fb0: fb@600000 {
                        display = <&display0>;
                        atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>;
                        status = "okay";
index e54f14d36b6f4c2516561ef83a0aecd224973645..a26f7ada429d180c9d0eb63e18434be34bad7183 100644 (file)
                        };
                };
 
-               fb0: fb@0x00700000 {
+               fb0: fb@700000 {
                        compatible = "atmel,at91sam9263-lcdc";
                        reg = <0x00700000 0x1000>;
                        interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
index 5a2e1af793f55aab9f4ddbe0c6843529af596762..f095b5d4d410e917b6421341ef4979423e22b852 100644 (file)
@@ -95,7 +95,7 @@
                        };
                };
 
-               fb0: fb@0x00700000 {
+               fb0: fb@700000 {
                        display = <&display0>;
                        status = "okay";
 
index 91a71774472eca02976018c63ebccc4ab2372709..31fecc2cdaf91d8e2fbca0364a27876232fd92ea 100644 (file)
@@ -25,7 +25,7 @@
                        };
 
                        i2c0: i2c@f8010000 {
-                               ov2640: camera@0x30 {
+                               ov2640: camera@30 {
                                        compatible = "ovti,ov2640";
                                        reg = <0x30>;
                                        pinctrl-names = "default";
index 2b127ca7aaa0a3f2feef3d962ebb634d6051d1b5..98348ebd6488fd60a8ff1e402fe2f691615eefc5 100644 (file)
                        };
                };
 
-               fb0: fb@0x00500000 {
+               fb0: fb@500000 {
                        compatible = "atmel,at91sam9g45-lcdc";
                        reg = <0x00500000 0x1000>;
                        interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>;
index e922552a04cb45b5841a4a9e9bf01f92fd8020d0..d793451ee04c5330bcc8a9b9c989cb0eff421142 100644 (file)
                        };
                };
 
-               fb0: fb@0x00500000 {
+               fb0: fb@500000 {
                        display = <&display0>;
                        status = "okay";
 
index 7f55050dd4057b6de1da1cc1053534d392c2cf47..ef0f2d049e1590184f2e04927c3a30c0edb7756a 100644 (file)
@@ -53,7 +53,7 @@
                        };
 
                        i2c1: i2c@f0018000 {
-                               ov2640: camera@0x30 {
+                               ov2640: camera@30 {
                                        compatible = "ovti,ov2640";
                                        reg = <0x30>;
                                        pinctrl-names = "default";
index 83e3d3e08fd44ae11d212feb091dd51701567c9a..97e171db597006926e24d4d756691d6249c6f06c 100644 (file)
@@ -88,7 +88,7 @@
                        };
 
                        i2c1: i2c@f0018000 {
-                               ov2640: camera@0x30 {
+                               ov2640: camera@30 {
                                        compatible = "ovti,ov2640";
                                        reg = <0x30>;
                                        pinctrl-names = "default";