From patchwork Thu Jan 18 03:31:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 124913 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp292871lja; Wed, 17 Jan 2018 19:33:12 -0800 (PST) X-Google-Smtp-Source: ACJfBosIweoPsVjh+I6YCxIgks+vCmYEIAUGoOtxb9t/oGpGBg98iimF2NCkFZUve89aPPmQ0hVz X-Received: by 10.99.116.22 with SMTP id p22mr30935577pgc.4.1516246392024; Wed, 17 Jan 2018 19:33:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516246392; cv=none; d=google.com; s=arc-20160816; b=kA3QiNK+AFfm839e9zaEkFURE4/Cy4HQ6MS5p/lSovZu6qH75F7e+icECka3arj26s 9h5e3DUpQpllUAwPitjYmpjNHgC/q5OJBv9u8wDWew9UAs600FmCJ8NPtWacpY7zJV5I etJHsV+bx4YqozsqVt6f3GFFrxb4kaSIrKLTEB7fBuZlns40EgESgcHmQvNsJr/VCT/7 6vOlItOXdA/6tKi2Q2kH/8zLGTidS+aefbFdA4rM2JaM846wJSlTbViPFCd0d9DL6nAC fW/P595oAlotlOxd0ndIEYPiOqmy9bPKkqBehudiG0DGB58LgptYZu0dG+Rd3v677G6h /Y1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=c6QMCd75yJlTKkrORuxJZl/MOjEaIq41Cvs/Jn71ATs=; b=bDkvfRNmkTj0bS9UYvUUOw3q3n1NzAT/dnLfnbq1VXPkqGT17eF9mmJFwkaCscrXwu h/Mh0K8N3C3n/0VDNkHJ0I6TdW0C5hFjfqKoLiIk1/b2XVIngbJ1fckB0F73UBbiu113 HyUVwb2SZc7eE0a1U1zfhWyidc7Vcy4PKrd2GH656pPKz9o28UUh0L74uOEWvdNP/z6+ BHBfcB3wpp6xEy5PtmFdm/IrSiKPLzih6c+U/uOzchNMq0ymp6kBc4D6uVOCiJLYtWzs 2GalucRqYjsRVBJ00oMviSV1AOayauwTF162GMz9frZS+BVIdl/jZ90jVqJmo+/IDrLP YAvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Yw7PxEVj; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x63si5639814pfk.335.2018.01.17.19.33.10; Wed, 17 Jan 2018 19:33:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Yw7PxEVj; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752955AbeARDdI (ORCPT + 6 others); Wed, 17 Jan 2018 22:33:08 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:57098 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbeARDdH (ORCPT ); Wed, 17 Jan 2018 22:33:07 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w0I3VlVX027175; Thu, 18 Jan 2018 12:31:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w0I3VlVX027175 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516246309; bh=USXhGvA8vg7p34jSoAxcuKSkWHZ61bK2gNlfalITDlM=; h=From:To:Cc:Subject:Date:From; b=Yw7PxEVjwsl7k0r8o/WYqq8FWts50XzJOx7Odjo8gsmrKIrHoWlbStysG2RyI00oT lddmcBys+3EZos+X/B+ZEf4U4lZMQ8MTkRa2Zn3hSc6r9rTtbDihxUGN6whDTJLAJy CKXd/w6szt8cxcnVlHOds2hWgUdQE4JIIYfB4QCwekqumI4GJRTTpEefLy7COESfF3 40syHMu63MMxVQAnCLdW/1FsiSkizf05lKZRpRTmjOcjEXH3xWRKrXWrjozR0cZCpl c+RgbyZsQjmHktMCsbVlYtp/5bFNeBLLskb0SE4Pq1N7wZDy/Tfzes6UmAu52gRlYr mIT8LpR2qJkOg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , devicetree@vger.kernel.org, Rob Herring , Sam Ravnborg , Michal Marek , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: fix W= option checks for extra DTC warnings Date: Thu, 18 Jan 2018 12:31:46 +0900 Message-Id: <1516246306-12851-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Kbuild supports 3 levels of extra warnings, and multiple levels can be combined, like W=12, W=123. It was added by commit a6de553da01c ("kbuild: Allow to combine multiple W= levels"). >From the log of commit 8654cb8d0371 ("dtc: update warning settings for new bus and node/property name checks"), I assume: - unit_address_vs_reg, simple_bus_reg, etc. belong to level 1 - node_name_chars_strict, property_name_chars_strict belong to level 2 However, the level 1 warnings are displayed by any argument to W=. On the other hand, the level 2 warnings are displayed by W=2, but not by W=12, or W=123. Use $(findstring ...) like scripts/Makefile.extrawarn. Signed-off-by: Masahiro Yamada --- Side Notes for possible additional works: [1] I implemented DTC extra warnings differently in U-Boot: https://github.com/u-boot/u-boot/blob/v2018.01/scripts/Makefile.extrawarn#L64 Better to collect extra warning stuff into scripts/Makefile.extrawarn ? [2] KBUILD_ENABLE_EXTRA_GCC_CHECKS is getting a historical misnomer because we use it for Clang and DTC too. Better to rename? (keeping backward-compatibility for a while)? scripts/Makefile.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Arnd Bergmann diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1ca4dcd..7dee1da 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -264,7 +264,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ DTC ?= $(objtree)/scripts/dtc/dtc # Disable noisy checks by default -ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),) +ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),) DTC_FLAGS += -Wno-unit_address_vs_reg \ -Wno-simple_bus_reg \ -Wno-unit_address_format \ @@ -273,7 +273,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \ -Wno-pci_device_reg endif -ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),2) +ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),) DTC_FLAGS += -Wnode_name_chars_strict \ -Wproperty_name_chars_strict endif