All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] kbuild: turn of dtc unit address warnings by default
@ 2017-02-27  6:24 Masahiro Yamada
  2017-03-03  4:52 ` Simon Glass
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Masahiro Yamada @ 2017-02-27  6:24 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

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(-)

diff --git a/Makefile b/Makefile
index 38b42da..b258de8 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 30e6e31..1b62aed 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -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))
+
 ######
 
 ###
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 6547e57..7b2cffc 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -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
-- 
2.7.4

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

end of thread, other threads:[~2017-03-10 15:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27  6:24 [U-Boot] [RFC PATCH] kbuild: turn of dtc unit address warnings by default Masahiro Yamada
2017-03-03  4:52 ` Simon Glass
2017-03-06  9:58 ` Bin Meng
2017-03-07 17:09 ` Masahiro Yamada
2017-03-07 18:10   ` Tom Rini
2017-03-08  2:20     ` Masahiro Yamada
2017-03-08  7:56     ` Peter Robinson
2017-03-10 15:10 ` [U-Boot] [U-Boot, RFC] " Tom Rini

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.