From patchwork Mon Jan 7 00:08:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1021123 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VU93v4rl"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Xwj34lVHz9s7h for ; Mon, 7 Jan 2019 11:08:36 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Iu9SAHRaCJba+UhkEjZFI/Pg8G5NKQnS9r35Ro7NChg=; b=VU93v4rlqT30kF /t2HPJDVFbBgYm+qIgJ2OjyXV4BXwIaRsXNTlauA+UOIbWL0+jmduDjro6EtnS9mPEcMsNfuJOJz4 AVhSkkXfbvsDMSNU/zmT0v7rhnDNXiyvPCFogfXMc5czAkTXsQCpqWZE3fpRgQTk3kUciXSAF5qeC haGRPmx8yO4vx5FQiCez2u4bqG+ClRUBZ7O7pR82uuKIM5F3dyGUJJ9RBwDe1XZP7te5a3T8vVYVk 6VX2xbHjcJ7SJcILzyPnmv7pX3v+iHO6FbHsWTwj6PzhTIEA+xq9uSyYT8xvHNCbypBBGgXdj+LwH 76Joc5+SJlfG8QzeQzCw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggISo-00058z-St; Mon, 07 Jan 2019 00:08:18 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggISk-00058a-IF for openwrt-devel@lists.openwrt.org; Mon, 07 Jan 2019 00:08:17 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 99F64436E; Mon, 7 Jan 2019 01:08:09 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 371c6f6d; Mon, 7 Jan 2019 00:34:55 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Mon, 7 Jan 2019 01:08:05 +0100 Message-Id: <1546819685-29375-1-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190106_160814_906808_81BDEAC2 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH] build: dtc: Disable noisy warnings by default X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org While helping with review and build testing of a few 4.19 pull requests, I've noticed, that dtc compiler in OpenWrt uses different options then upstream kernel, which is leading to a very noisy output[1]. It wouldn't be that bad per se, but a lot of such warnings aren't easily fixable so I think, that we should follow what upstream does and simply ignore^W silence those noisy warnings. So this patch tries to syncs dtc compiler flags with upstream kernel till version 4.19.13, disabling those warnings as they were added in upstream kernel: v4.6-rc1-2-gbc55398 dtc: turn off dtc unit address warnings by default The newly added dtc warning to check DT unit-address without reg property and vice-versa generates lots of warnings. Turn off the check unless building with W=1 or W=2. v4.11-rc2-11-g8654cb8 dtc: update warning settings for new bus and node/property dtc gained new warnings checking PCI and simple buses, unit address formatting, and stricter node and property name checking. Disable the new dtc warnings by default as there are 1000s. As before, warnings are enabled with W=1 or W=2. The strict node and property name checks are a bit subjective, so they are only enabled for W=2. v4.16-rc3-9-g4fd98e3 scripts: turn off some new dtc warnings by default The latest dtc update adds some new noisy warnings, so turn them off by default. Disable 'avoid_unnecessary_addr_size' and 'alias_paths'. They can be re-enabled by building with 'W=1'. v4.17-rc1-27-g74656b6 kbuild: disable new dtc graph and unit-address warnings dtc gained some new warnings for OF graphs and unique unit addresses, but they are currently much too noisy. So turn off 'graph_child_address', 'graph_port', and 'unique_unit_address' warnings by default. They can be enabled by building dtbs with W=1. Build tested on imx6 and ath79 with 4.14 and 4.19. 1. https://github.com/openwrt/openwrt/pull/1694#issuecomment-450864335 Signed-off-by: Petr Štetiar --- include/image.mk | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/include/image.mk b/include/image.mk index a2b106d..f2c9019 100644 --- a/include/image.mk +++ b/include/image.mk @@ -152,6 +152,32 @@ ifdef CONFIG_TARGET_IMAGES_GZIP endef endif + +# Disable noisy checks by default as in upstream +ifeq ($(strip $(call kernel_patchver_ge,4.6.0)),1) + DTC_FLAGS += -Wno-unit_address_vs_reg +endif +ifeq ($(strip $(call kernel_patchver_ge,4.11.0)),1) + DTC_FLAGS += \ + -Wno-unit_address_vs_reg \ + -Wno-simple_bus_reg \ + -Wno-unit_address_format \ + -Wno-pci_bridge \ + -Wno-pci_device_bus_num \ + -Wno-pci_device_reg +endif +ifeq ($(strip $(call kernel_patchver_ge,4.16.0)),1) + DTC_FLAGS += \ + -Wno-avoid_unnecessary_addr_size \ + -Wno-alias_paths +endif +ifeq ($(strip $(call kernel_patchver_ge,4.17.0)),1) + DTC_FLAGS += \ + -Wno-graph_child_address \ + -Wno-graph_port \ + -Wno-unique_unit_address +endif + # $(1) source dts file # $(2) target dtb file # $(3) extra CPP flags @@ -164,7 +190,7 @@ define Image/BuildDTB -undef -D__DTS__ $(3) \ -o $(2).tmp $(1) $(LINUX_DIR)/scripts/dtc/dtc -O dtb \ - -i$(dir $(1)) $(4) \ + -i$(dir $(1)) $(DTC_FLAGS) $(4) \ -o $(2) $(2).tmp $(RM) $(2).tmp endef