From patchwork Mon Feb 27 06:24:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 732710 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vWsCT0NsSz9s9x for ; Mon, 27 Feb 2017 17:25:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="vTuGjl6v"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E856B3ACD; Mon, 27 Feb 2017 07:25:38 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ufoou8pO1BRH; Mon, 27 Feb 2017 07:25:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40F073ABF; Mon, 27 Feb 2017 07:25:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B79993ABF for ; Mon, 27 Feb 2017 07:25:34 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EBcQYG1s0_VR for ; Mon, 27 Feb 2017 07:25:34 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-07.nifty.com (conuserg-07.nifty.com [210.131.2.74]) by theia.denx.de (Postfix) with ESMTPS id 104933ABA for ; Mon, 27 Feb 2017 07:25:29 +0100 (CET) Received: from pug.jp.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id v1R6OlRk007054; Mon, 27 Feb 2017 15:24:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v1R6OlRk007054 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1488176688; bh=JgC9um47ni865xFldmddPLV4maNHkQxm4Y/65GufUa0=; h=From:To:Cc:Subject:Date:From; b=vTuGjl6vYCaUR/hwLIxPurViS1S/fkUDyhzCbs+GWQoIOxR8klVZVa9IjiLpQcJmm I8QHqhmmNgD1F+MGzIBnUNEn/U382z6AGd7dsDXbpT0Eh07r3KCjQt8oloE+9qMMKk ijg0DrjM3iHvr+ZzBRN3afCRGB5r+czfU3egALb03ldhgTV8p6ZEyMyxbiPxKBX6Ip PTAfzEnbfumlHCPN1CvUihdZMrLoysK6aGT+Cvdz1IkQwcUB6Rbr3RGZhV/owyTa14 CiPAAHJnMtZGHSUamrCLecJdpdrUQ4+p+eg9D4de6P57JDRkSepfDBoL3zyeFOpXW4 efyHKonyBQXrA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 27 Feb 2017 15:24:45 +0900 Message-Id: <1488176685-23740-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Tom Rini , Stephen Warren Subject: [U-Boot] [RFC PATCH] kbuild: turn of dtc unit address warnings by default X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "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 Reviewed-by: Simon Glass Tested-by: Bin Meng --- This is one possible answer to Tom's: https://www.mail-archive.com/u-boot@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