Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: at91: Remove leading 0x and 0s from bindings notation

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>

authored by

Mathieu Malaterre and committed by
Alexandre Belloni
ed4ced0c 42ed5355

+9 -9
+1 -1
arch/arm/boot/dts/at91sam9261.dtsi
··· 80 80 status = "disabled"; 81 81 }; 82 82 83 - fb0: fb@0x00600000 { 83 + fb0: fb@600000 { 84 84 compatible = "atmel,at91sam9261-lcdc"; 85 85 reg = <0x00600000 0x1000>; 86 86 interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
+1 -1
arch/arm/boot/dts/at91sam9261ek.dts
··· 36 36 status = "okay"; 37 37 }; 38 38 39 - fb0: fb@0x00600000 { 39 + fb0: fb@600000 { 40 40 display = <&display0>; 41 41 atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>; 42 42 status = "okay";
+1 -1
arch/arm/boot/dts/at91sam9263.dtsi
··· 999 999 }; 1000 1000 }; 1001 1001 1002 - fb0: fb@0x00700000 { 1002 + fb0: fb@700000 { 1003 1003 compatible = "atmel,at91sam9263-lcdc"; 1004 1004 reg = <0x00700000 0x1000>; 1005 1005 interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
+1 -1
arch/arm/boot/dts/at91sam9263ek.dts
··· 95 95 }; 96 96 }; 97 97 98 - fb0: fb@0x00700000 { 98 + fb0: fb@700000 { 99 99 display = <&display0>; 100 100 status = "okay"; 101 101
+1 -1
arch/arm/boot/dts/at91sam9g25ek.dts
··· 25 25 }; 26 26 27 27 i2c0: i2c@f8010000 { 28 - ov2640: camera@0x30 { 28 + ov2640: camera@30 { 29 29 compatible = "ovti,ov2640"; 30 30 reg = <0x30>; 31 31 pinctrl-names = "default";
+1 -1
arch/arm/boot/dts/at91sam9g45.dtsi
··· 1302 1302 }; 1303 1303 }; 1304 1304 1305 - fb0: fb@0x00500000 { 1305 + fb0: fb@500000 { 1306 1306 compatible = "atmel,at91sam9g45-lcdc"; 1307 1307 reg = <0x00500000 0x1000>; 1308 1308 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>;
+1 -1
arch/arm/boot/dts/at91sam9m10g45ek.dts
··· 220 220 }; 221 221 }; 222 222 223 - fb0: fb@0x00500000 { 223 + fb0: fb@500000 { 224 224 display = <&display0>; 225 225 status = "okay"; 226 226
+1 -1
arch/arm/boot/dts/sama5d3xmb.dtsi
··· 53 53 }; 54 54 55 55 i2c1: i2c@f0018000 { 56 - ov2640: camera@0x30 { 56 + ov2640: camera@30 { 57 57 compatible = "ovti,ov2640"; 58 58 reg = <0x30>; 59 59 pinctrl-names = "default";
+1 -1
arch/arm/boot/dts/sama5d3xmb_cmp.dtsi
··· 88 88 }; 89 89 90 90 i2c1: i2c@f0018000 { 91 - ov2640: camera@0x30 { 91 + ov2640: camera@30 { 92 92 compatible = "ovti,ov2640"; 93 93 reg = <0x30>; 94 94 pinctrl-names = "default";