Skip to contentSkip to conversation

kbuild: turn of dtc unit address warnings by default

RFC PATCH In review Masahiro Yamada 5 participants 8 messages Feb 27, 2017 – Mar 10, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

 Makefile                   | 2 +-
 scripts/Kbuild.include     | 5 +++++
 scripts/Makefile.extrawarn | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
Makefile +1 -1
index 38b42da..b258de8 100644
@@ -371,7 +371,7 @@ export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR
 export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC
 export CPP AR NM LDR STRIP OBJCOPY OBJDUMP
 export MAKE AWK PERL PYTHON
-export HOSTCXX HOSTCXXFLAGS DTC CHECK CHECKFLAGS
+export HOSTCXX HOSTCXXFLAGS CHECK CHECKFLAGS DTC DTC_FLAGS
 
 export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS
 export KBUILD_CFLAGS KBUILD_AFLAGS
scripts/Kbuild.include +5 -0
index 30e6e31..1b62aed 100644
@@ -172,6 +172,11 @@ ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh)
 # Usage:  $(call ld-ifversion, -ge, 22252, y)
 ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4))
 
+# dtc-option
+# Usage:  DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
+dtc-option = $(call try-run,\
+	echo '/dts-v1/; / {};' | $(DTC) $(1),$(1),$(2))
+
 ######
 
 ###
scripts/Makefile.extrawarn +6 -0
index 6547e57..7b2cffc 100644
@@ -57,4 +57,10 @@ ifeq ("$(strip $(warning))","")
 endif
 
 KBUILD_CFLAGS += $(warning)
+
+else
+
+# Disable noisy checks by default
+DTC_FLAGS += $(call dtc-option,-Wno-unit_address_vs_reg)
+
 endif
Signature · 1 line
2.7.4
#1 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

Quoted 30 lines · Masahiro Yamada

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

Quoted 4 lines
 Makefile                   | 2 +-
 scripts/Kbuild.include     | 5 +++++
 scripts/Makefile.extrawarn | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

Seems like a good idea to me, at least until more are converted.

#2 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

In reply to Masahiro Yamada
Quoted 30 lines · Masahiro Yamada

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

Quoted 5 lines
 Makefile                   | 2 +-
 scripts/Kbuild.include     | 5 +++++
 scripts/Makefile.extrawarn | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
#3 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

In reply to Masahiro Yamada

2017-02-27 15:24 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 22 lines

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Quoted 6 lines

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

I sent a similar patch for Linux, but
the response was negative in the Kbuild subsystem.

So, this patch will be our own, if applied.

I think the necessity for this patch comes down to how long we expect for fixing DT files.

The only difficulty is in our basic rule:
Send patches to Linux first, then import DT to U-Boot.

Without this, fixing the warnings would be pretty easy...

Signature · 2 lines
Best Regards
Masahiro Yamada
#4 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

Quoted 30 lines · Masahiro Yamada

2017-02-27 15:24 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 22 lines

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Quoted 6 lines

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

Quoted 4 lines

I sent a similar patch for Linux, but
the response was negative in the Kbuild subsystem.

So, this patch will be our own, if applied.

I think we should be proactive here and take this patch. Newer dtc will be seen more widely I believe as various overlay related changes go in upstream. Do you have anything you would change in a v2 non-RFC?

Quoted 8 lines

I think the necessity for this patch comes down to how long we expect for fixing DT files.

The only difficulty is in our basic rule:
Send patches to Linux first, then import DT to U-Boot.

Without this, fixing the warnings would be pretty easy...

I guess I would suggest that for the DT files we really own, we should update them. Otherwise, just make the warnings happen in the kernel and correct them and upstream them there. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170307/8e8e8058/attachment.sig>
#5 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

Hi Tom,

2017-03-08 3:10 GMT+09:00 Tom Rini <[email protected]>:

Quoted 31 lines · Masahiro Yamada
Quoted 30 lines

2017-02-27 15:24 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 28 lines

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

Quoted 8 lines
Quoted 4 lines

I sent a similar patch for Linux, but
the response was negative in the Kbuild subsystem.

So, this patch will be our own, if applied.

I think we should be proactive here and take this patch. Newer dtc will be seen more widely I believe as various overlay related changes go in upstream. Do you have anything you would change in a v2 non-RFC?

No more update.
If you like this patch, please feel free to take it.

Signature · 2 lines
Best Regards
Masahiro Yamada
#6 lore raw

RFC PATCH 1/1 kbuild: turn of dtc unit address warnings by default

In reply to Tom Rini
Quoted 31 lines · Tom Rini
Quoted 30 lines · Masahiro Yamada

2017-02-27 15:24 GMT+09:00 Masahiro Yamada <[email protected]>:

Quoted 28 lines

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

---

This is one possible answer to Tom's:
https://www.mail-archive.com/u-boot at lists.denx.de/msg240328.html

He fixed the problem on travis-ci by commit a0f3e3d, but it is still annoying during the regular development.
Perhaps we may want to hide the warnings (at least hidden in Linux Kernel by default).
Or, is it better to keep it noisy
to motivate people to fix their DT files?
I am not quite sure...

Now I am sending this as RFC patch in case people may want to start discussion.

BTW, this is a counter-part of the patch I sent to the Kbuild sub-system
(https://patchwork.kernel.org/patch/9592747/)
because I want the U-Boot build system with Linux as much as possible. Let's see if I will get possible opinions in the Kbuild review.

Quoted 8 lines
Quoted 4 lines

I sent a similar patch for Linux, but
the response was negative in the Kbuild subsystem.

So, this patch will be our own, if applied.

I think we should be proactive here and take this patch. Newer dtc will be seen more widely I believe as various overlay related changes go in upstream. Do you have anything you would change in a v2 non-RFC?

For reference they updated the kernel included dtc to upstream commit 0931cea3ba20 in 4.11 for overlay support [1] so I similarly updated the Fedora dtc to the same revision for consistency so I think this is a pragmatic approach.

Peter

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6f05afcbb031722ec1eff77dde188ff2edf8940e

#7 lore raw
In reply to Masahiro Yamada
Quoted 11 lines · Masahiro Yamada

DTC 1.4.2 or later checks DT unit-address without reg property and vice-versa, and generates lots of warnings. Fixing DT files will take for a while. Until then, let's turn off the check unless building with W=*.

Introduce a new helper dtc-option to check if the option is supported in order to suppress warnings on older versions.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170310/e2d37d60/attachment.sig>