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

ARM: dts: lpc32xx: 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" {} +

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 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>
[vzapolskiy: fixed commit message to pass checkpatch.pl test]
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>

authored by

Mathieu Malaterre and committed by
Vladimir Zapolskiy
3e3380d0 ee65af7f

+9 -9
+9 -9
arch/arm/boot/dts/lpc32xx.dtsi
··· 230 230 status = "disabled"; 231 231 }; 232 232 233 - i2s1: i2s@2009C000 { 233 + i2s1: i2s@2009c000 { 234 234 compatible = "nxp,lpc3220-i2s"; 235 235 reg = <0x2009C000 0x1000>; 236 236 }; ··· 273 273 status = "disabled"; 274 274 }; 275 275 276 - i2c1: i2c@400A0000 { 276 + i2c1: i2c@400a0000 { 277 277 compatible = "nxp,pnx-i2c"; 278 278 reg = <0x400A0000 0x100>; 279 279 interrupt-parent = <&sic1>; ··· 284 284 clocks = <&clk LPC32XX_CLK_I2C1>; 285 285 }; 286 286 287 - i2c2: i2c@400A8000 { 287 + i2c2: i2c@400a8000 { 288 288 compatible = "nxp,pnx-i2c"; 289 289 reg = <0x400A8000 0x100>; 290 290 interrupt-parent = <&sic1>; ··· 295 295 clocks = <&clk LPC32XX_CLK_I2C2>; 296 296 }; 297 297 298 - mpwm: mpwm@400E8000 { 298 + mpwm: mpwm@400e8000 { 299 299 compatible = "nxp,lpc3220-motor-pwm"; 300 300 reg = <0x400E8000 0x78>; 301 301 status = "disabled"; ··· 394 394 #gpio-cells = <3>; /* bank, pin, flags */ 395 395 }; 396 396 397 - timer4: timer@4002C000 { 397 + timer4: timer@4002c000 { 398 398 compatible = "nxp,lpc3220-timer"; 399 399 reg = <0x4002C000 0x1000>; 400 400 interrupts = <3 IRQ_TYPE_LEVEL_LOW>; ··· 412 412 status = "disabled"; 413 413 }; 414 414 415 - watchdog: watchdog@4003C000 { 415 + watchdog: watchdog@4003c000 { 416 416 compatible = "nxp,pnx4008-wdt"; 417 417 reg = <0x4003C000 0x1000>; 418 418 clocks = <&clk LPC32XX_CLK_WDOG>; ··· 451 451 status = "disabled"; 452 452 }; 453 453 454 - timer1: timer@4004C000 { 454 + timer1: timer@4004c000 { 455 455 compatible = "nxp,lpc3220-timer"; 456 456 reg = <0x4004C000 0x1000>; 457 457 interrupts = <17 IRQ_TYPE_LEVEL_LOW>; ··· 475 475 status = "disabled"; 476 476 }; 477 477 478 - pwm1: pwm@4005C000 { 478 + pwm1: pwm@4005c000 { 479 479 compatible = "nxp,lpc3220-pwm"; 480 480 reg = <0x4005C000 0x4>; 481 481 clocks = <&clk LPC32XX_CLK_PWM1>; ··· 484 484 status = "disabled"; 485 485 }; 486 486 487 - pwm2: pwm@4005C004 { 487 + pwm2: pwm@4005c004 { 488 488 compatible = "nxp,lpc3220-pwm"; 489 489 reg = <0x4005C004 0x4>; 490 490 clocks = <&clk LPC32XX_CLK_PWM2>;