All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mips: dts: Remove leading 0x and 0s from bindings notation
@ 2017-12-14 16:53 Mathieu Malaterre
  2018-01-23 11:44   ` James Hogan
  2018-01-24 11:42   ` Mathieu Malaterre
  0 siblings, 2 replies; 6+ messages in thread
From: Mathieu Malaterre @ 2017-12-14 16:53 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mathieu Malaterre, Paul Burton, Mark Rutland, Ralf Baechle,
	Philippe Ombredanne, Paul Cercueil, Thomas Gleixner,
	Greg Kroah-Hartman, Harvey Hunt, linux-mips, devicetree,
	linux-kernel

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 -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\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
the opening curly brace:

https://elinux.org/Device_Tree_Linux#Linux_conventions

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>
---
 arch/mips/boot/dts/img/boston.dts   | 2 +-
 arch/mips/boot/dts/ingenic/ci20.dts | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
index 2cd49b60e030..1bd105428f61 100644
--- a/arch/mips/boot/dts/img/boston.dts
+++ b/arch/mips/boot/dts/img/boston.dts
@@ -157,7 +157,7 @@
 					#address-cells = <1>;
 					#size-cells = <0>;
 
-					rtc@0x68 {
+					rtc@68 {
 						compatible = "st,m41t81s";
 						reg = <0x68>;
 					};
diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index a4cc52214dbd..7d5e49e40b0d 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -110,22 +110,22 @@
 					reg = <0x0 0x0 0x0 0x800000>;
 				};
 
-				partition@0x800000 {
+				partition@800000 {
 					label = "u-boot";
 					reg = <0x0 0x800000 0x0 0x200000>;
 				};
 
-				partition@0xa00000 {
+				partition@a00000 {
 					label = "u-boot-env";
 					reg = <0x0 0xa00000 0x0 0x200000>;
 				};
 
-				partition@0xc00000 {
+				partition@c00000 {
 					label = "boot";
 					reg = <0x0 0xc00000 0x0 0x4000000>;
 				};
 
-				partition@0x8c00000 {
+				partition@8c00000 {
 					label = "system";
 					reg = <0x0 0x4c00000 0x1 0xfb400000>;
 				};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mips: dts: Remove leading 0x and 0s from bindings notation
@ 2018-01-23 11:44   ` James Hogan
  0 siblings, 0 replies; 6+ messages in thread
From: James Hogan @ 2018-01-23 11:44 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Rob Herring, Paul Burton, Mark Rutland, Ralf Baechle,
	Philippe Ombredanne, Paul Cercueil, Thomas Gleixner,
	Greg Kroah-Hartman, Harvey Hunt, linux-mips, devicetree,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2735 bytes --]

On Thu, Dec 14, 2017 at 05:53:56PM +0100, Mathieu Malaterre wrote:
> 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 -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\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
> the opening curly brace:
> 
> https://elinux.org/Device_Tree_Linux#Linux_conventions
> 
> 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>
> ---
>  arch/mips/boot/dts/img/boston.dts   | 2 +-
>  arch/mips/boot/dts/ingenic/ci20.dts | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
> index 2cd49b60e030..1bd105428f61 100644
> --- a/arch/mips/boot/dts/img/boston.dts
> +++ b/arch/mips/boot/dts/img/boston.dts
> @@ -157,7 +157,7 @@
>  					#address-cells = <1>;
>  					#size-cells = <0>;
>  
> -					rtc@0x68 {
> +					rtc@68 {
>  						compatible = "st,m41t81s";
>  						reg = <0x68>;
>  					};
> diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
> index a4cc52214dbd..7d5e49e40b0d 100644
> --- a/arch/mips/boot/dts/ingenic/ci20.dts
> +++ b/arch/mips/boot/dts/ingenic/ci20.dts
> @@ -110,22 +110,22 @@
>  					reg = <0x0 0x0 0x0 0x800000>;
>  				};
>  
> -				partition@0x800000 {
> +				partition@800000 {
>  					label = "u-boot";
>  					reg = <0x0 0x800000 0x0 0x200000>;
>  				};
>  
> -				partition@0xa00000 {
> +				partition@a00000 {
>  					label = "u-boot-env";
>  					reg = <0x0 0xa00000 0x0 0x200000>;
>  				};
>  
> -				partition@0xc00000 {
> +				partition@c00000 {
>  					label = "boot";
>  					reg = <0x0 0xc00000 0x0 0x4000000>;
>  				};
>  
> -				partition@0x8c00000 {
> +				partition@8c00000 {
>  					label = "system";
>  					reg = <0x0 0x4c00000 0x1 0xfb400000>;

should that one actually be called partition@4c00000?

Cheers
James

>  				};
> -- 
> 2.11.0
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mips: dts: Remove leading 0x and 0s from bindings notation
@ 2018-01-23 11:44   ` James Hogan
  0 siblings, 0 replies; 6+ messages in thread
From: James Hogan @ 2018-01-23 11:44 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Rob Herring, Paul Burton, Mark Rutland, Ralf Baechle,
	Philippe Ombredanne, Paul Cercueil, Thomas Gleixner,
	Greg Kroah-Hartman, Harvey Hunt,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2824 bytes --]

On Thu, Dec 14, 2017 at 05:53:56PM +0100, Mathieu Malaterre wrote:
> 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 -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\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
> the opening curly brace:
> 
> https://elinux.org/Device_Tree_Linux#Linux_conventions
> 
> This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation")
> 
> Reported-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
> Suggested-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Mathieu Malaterre <malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
> ---
>  arch/mips/boot/dts/img/boston.dts   | 2 +-
>  arch/mips/boot/dts/ingenic/ci20.dts | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
> index 2cd49b60e030..1bd105428f61 100644
> --- a/arch/mips/boot/dts/img/boston.dts
> +++ b/arch/mips/boot/dts/img/boston.dts
> @@ -157,7 +157,7 @@
>  					#address-cells = <1>;
>  					#size-cells = <0>;
>  
> -					rtc@0x68 {
> +					rtc@68 {
>  						compatible = "st,m41t81s";
>  						reg = <0x68>;
>  					};
> diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
> index a4cc52214dbd..7d5e49e40b0d 100644
> --- a/arch/mips/boot/dts/ingenic/ci20.dts
> +++ b/arch/mips/boot/dts/ingenic/ci20.dts
> @@ -110,22 +110,22 @@
>  					reg = <0x0 0x0 0x0 0x800000>;
>  				};
>  
> -				partition@0x800000 {
> +				partition@800000 {
>  					label = "u-boot";
>  					reg = <0x0 0x800000 0x0 0x200000>;
>  				};
>  
> -				partition@0xa00000 {
> +				partition@a00000 {
>  					label = "u-boot-env";
>  					reg = <0x0 0xa00000 0x0 0x200000>;
>  				};
>  
> -				partition@0xc00000 {
> +				partition@c00000 {
>  					label = "boot";
>  					reg = <0x0 0xc00000 0x0 0x4000000>;
>  				};
>  
> -				partition@0x8c00000 {
> +				partition@8c00000 {
>  					label = "system";
>  					reg = <0x0 0x4c00000 0x1 0xfb400000>;

should that one actually be called partition@4c00000?

Cheers
James

>  				};
> -- 
> 2.11.0
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] mips: dts: Remove leading 0x and 0s from bindings notation
@ 2018-01-24 11:42   ` Mathieu Malaterre
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Malaterre @ 2018-01-24 11:42 UTC (permalink / raw)
  To: James Hogan
  Cc: Mathieu Malaterre, Paul Burton, Rob Herring, Mark Rutland,
	Ralf Baechle, Paul Cercueil, Greg Kroah-Hartman, Kate Stewart,
	Thomas Gleixner, Harvey Hunt, linux-mips, devicetree,
	linux-kernel

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 -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\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
the opening curly brace:

https://elinux.org/Device_Tree_Linux#Linux_conventions

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>
---
 arch/mips/boot/dts/img/boston.dts   | 2 +-
 arch/mips/boot/dts/ingenic/ci20.dts | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
index 2cd49b60e030..1bd105428f61 100644
--- a/arch/mips/boot/dts/img/boston.dts
+++ b/arch/mips/boot/dts/img/boston.dts
@@ -157,7 +157,7 @@
 					#address-cells = <1>;
 					#size-cells = <0>;
 
-					rtc@0x68 {
+					rtc@68 {
 						compatible = "st,m41t81s";
 						reg = <0x68>;
 					};
diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index a4cc52214dbd..7d5e49e40b0d 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -110,22 +110,22 @@
 					reg = <0x0 0x0 0x0 0x800000>;
 				};
 
-				partition@0x800000 {
+				partition@800000 {
 					label = "u-boot";
 					reg = <0x0 0x800000 0x0 0x200000>;
 				};
 
-				partition@0xa00000 {
+				partition@a00000 {
 					label = "u-boot-env";
 					reg = <0x0 0xa00000 0x0 0x200000>;
 				};
 
-				partition@0xc00000 {
+				partition@c00000 {
 					label = "boot";
 					reg = <0x0 0xc00000 0x0 0x4000000>;
 				};
 
-				partition@0x8c00000 {
+				partition@8c00000 {
 					label = "system";
 					reg = <0x0 0x4c00000 0x1 0xfb400000>;
 				};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] mips: dts: Remove leading 0x and 0s from bindings notation
@ 2018-01-24 11:42   ` Mathieu Malaterre
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Malaterre @ 2018-01-24 11:42 UTC (permalink / raw)
  To: James Hogan
  Cc: Mathieu Malaterre, Paul Burton, Rob Herring, Mark Rutland,
	Ralf Baechle, Paul Cercueil, Greg Kroah-Hartman, Kate Stewart,
	Thomas Gleixner, Harvey Hunt, linux-mips-6z/3iImG2C8G8FEW9MqTrA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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 -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\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
the opening curly brace:

https://elinux.org/Device_Tree_Linux#Linux_conventions

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

Reported-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Suggested-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Signed-off-by: Mathieu Malaterre <malat-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
---
 arch/mips/boot/dts/img/boston.dts   | 2 +-
 arch/mips/boot/dts/ingenic/ci20.dts | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
index 2cd49b60e030..1bd105428f61 100644
--- a/arch/mips/boot/dts/img/boston.dts
+++ b/arch/mips/boot/dts/img/boston.dts
@@ -157,7 +157,7 @@
 					#address-cells = <1>;
 					#size-cells = <0>;
 
-					rtc@0x68 {
+					rtc@68 {
 						compatible = "st,m41t81s";
 						reg = <0x68>;
 					};
diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index a4cc52214dbd..7d5e49e40b0d 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -110,22 +110,22 @@
 					reg = <0x0 0x0 0x0 0x800000>;
 				};
 
-				partition@0x800000 {
+				partition@800000 {
 					label = "u-boot";
 					reg = <0x0 0x800000 0x0 0x200000>;
 				};
 
-				partition@0xa00000 {
+				partition@a00000 {
 					label = "u-boot-env";
 					reg = <0x0 0xa00000 0x0 0x200000>;
 				};
 
-				partition@0xc00000 {
+				partition@c00000 {
 					label = "boot";
 					reg = <0x0 0xc00000 0x0 0x4000000>;
 				};
 
-				partition@0x8c00000 {
+				partition@8c00000 {
 					label = "system";
 					reg = <0x0 0x4c00000 0x1 0xfb400000>;
 				};
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] mips: dts: Fix a typo in the node unit name
  2018-01-24 11:42   ` Mathieu Malaterre
  (?)
@ 2018-01-24 11:42   ` Mathieu Malaterre
  -1 siblings, 0 replies; 6+ messages in thread
From: Mathieu Malaterre @ 2018-01-24 11:42 UTC (permalink / raw)
  To: James Hogan
  Cc: Mathieu Malaterre, Paul Burton, Rob Herring, Mark Rutland,
	Ralf Baechle, Philippe Ombredanne, Harvey Hunt, Paul Cercueil,
	Greg Kroah-Hartman, linux-mips, devicetree, linux-kernel

The unit name was 8c00000 but since the reg property is declared as:

  reg = <0x0 0x4c00000 0x1 0xfb400000>;

the unit name should have been instead 4c00000.

Tested on MIPS Creator CI20 (v1):

$ cat /sys/firmware/devicetree/.../partitions/partition@4c00000/label;echo
system

Reported-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/mips/boot/dts/ingenic/ci20.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts
index 7d5e49e40b0d..38078594cf97 100644
--- a/arch/mips/boot/dts/ingenic/ci20.dts
+++ b/arch/mips/boot/dts/ingenic/ci20.dts
@@ -125,7 +125,7 @@
 					reg = <0x0 0xc00000 0x0 0x4000000>;
 				};
 
-				partition@8c00000 {
+				partition@4c00000 {
 					label = "system";
 					reg = <0x0 0x4c00000 0x1 0xfb400000>;
 				};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-24 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 16:53 [PATCH] mips: dts: Remove leading 0x and 0s from bindings notation Mathieu Malaterre
2018-01-23 11:44 ` James Hogan
2018-01-23 11:44   ` James Hogan
2018-01-24 11:42 ` [PATCH v2 1/2] " Mathieu Malaterre
2018-01-24 11:42   ` Mathieu Malaterre
2018-01-24 11:42   ` [PATCH v2 2/2] mips: dts: Fix a typo in the node unit name Mathieu Malaterre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.