Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp811617pxb; Wed, 25 Aug 2021 16:10:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOJy9WMatlqhGjyGooTEcCLTtXdsyHIIQ4H4L5G90XD5lktJYoQkfVurQ0vG9tDSr+GU9y X-Received: by 2002:a05:6402:c05:: with SMTP id co5mr1014567edb.41.1629933005399; Wed, 25 Aug 2021 16:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629933005; cv=none; d=google.com; s=arc-20160816; b=kkOUHmaWuFZ6DZ/7MCd0cxsaw55DrBpvvAQUtwS8KdKYGiP9QcDl7lMD7Jkvk68J/b YJs9M2OUAihXBu7JUeQ++XfJ1jR7b29caQ4URlw13SAQ9U+JLuzPS/XpU48F1PU1Dta7 4LBGIUyPejfef2ai31IISslYj+1HVIfQ77yERRHU4b/ZgjkVrStW563y8PbYex+virHz MuSO8/U5024g/0e5EnDOWb0ES0tdXZ7+tWYSS5pJVzaoOCN+dKm1Io8cPEIhrYDmOVIs rGjSXhjQRZ3BrJ1jZ39L3Ff85bWa1ZzvG9jYXS5BOKvuEhyFwD0jeCbOE/usoHJmoV2X KesQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=3ObmmBcpszREbrXynG73ZgqvDQ+c+5VX6C24h3tb0zY=; b=pcug/uYGO5h040zTsw7oqPWbW0c1lG1vBYVA2vkEYvO5MiN7cyFGonzhvyaxLTGQN+ 5HB3csF5vL2dS4R3xkUJ0p3EyFSCKGCHfW4FfS1rhXxp5xWik7VC5KDgDfwg5Gr2Fe+Q 2IHc0+0wyLxxKPPMKhxjFraatKu4Hp4CchgmGB/aZTBOU9A3jk7yO9WxByuBbQw7M3Fo oGXHBMiHN8OGRvGQSjOHwSKNH/bhjFQOeOv8gKUydMSCCEvPlErenPY9NamfI0Mh3wOU fOjYwdSjciD7RPx1q4uaxFNX2c+JCoQVrEDXHz1aawSuzYkKdxzxhzWZpTjTAEbvyZ0v kPVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JpYeWiCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds7si1389087ejc.524.2021.08.25.16.09.29; Wed, 25 Aug 2021 16:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JpYeWiCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232935AbhHYXIh (ORCPT + 99 others); Wed, 25 Aug 2021 19:08:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:40038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbhHYXIh (ORCPT ); Wed, 25 Aug 2021 19:08:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2C7EC610C7; Wed, 25 Aug 2021 23:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629932871; bh=/oV5vifeAsDt2n4hLOIWlI4IWQvQxrjGqtyQT9n8jvI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=JpYeWiCC4KMCvNENg2fv2bOj8trKKz9oiYLQsqevnKexyZJTE0KqsemGDOEoAiU+j g+X6dnhU9dMZmVwDw9mjjacmKqGRAjeSoh4XJqvPpwPNI7MD5wTH9T1h/d8pRcQMlu o4YdQVXZqeYjakCMUJICySoBqgR2uruJ6VsouscfAQGCtEmUgTYJy5mlLuSlZE6Jfd CIBxm3qTXkKa8halFjNbtAMBElGpirlhaUoUSoPolxPWNucUXT292yKJcEE/g8nOmN EINqYVEwFmMYb4hkMfnNl7BZJ40bOPdEMk0v6iQCg0SIqWZ+L/EF8nEEZIXP1N9JC5 v8CChbPcaUaOQ== Subject: Re: [PATCH] drm/i915: Clean up disabled warnings To: Nick Desaulniers Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, llvm@lists.linux.dev References: <20210824232237.2085342-1-nathan@kernel.org> From: Nathan Chancellor Message-ID: Date: Wed, 25 Aug 2021 16:07:48 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/25/2021 4:03 PM, Nick Desaulniers wrote: > On Tue, Aug 24, 2021 at 4:23 PM Nathan Chancellor wrote: >> >> i915 enables a wider set of warnings with '-Wall -Wextra' then disables >> several with cc-disable-warning. If an unknown flag gets added to >> KBUILD_CFLAGS when building with clang, all subsequent calls to >> cc-{disable-warning,option} will fail, meaning that all of these >> warnings do not get disabled [1]. >> >> A separate series will address the root cause of the issue by not adding >> these flags when building with clang [2]; however, the symptom of these >> extra warnings appearing can be addressed separately by just removing >> the calls to cc-disable-warning, which makes the build ever so slightly >> faster because the compiler does not need to be called as much before >> building. >> >> The following warnings are supported by GCC 4.9 and clang 10.0.1, which >> are the minimum supported versions of these compilers so the call to >> cc-disable-warning is not necessary. Masahiro cleaned this up for the >> reset of the kernel in commit 4c8dd95a723d ("kbuild: add some extra >> warning flags unconditionally"). >> >> * -Wmissing-field-initializers >> * -Wsign-compare >> * -Wtype-limits >> * -Wunused-parameter >> >> -Wunused-but-set-variable was implemented in clang 13.0.0 and >> -Wframe-address was implemented in clang 12.0.0 so the >> cc-disable-warning calls are kept for these two warnings. >> >> Lastly, -Winitializer-overrides is clang's version of -Woverride-init, >> which is disabled for the specific files that are problematic. clang >> added a compatibility alias in clang 8.0.0 so -Winitializer-overrides >> can be removed. >> >> [1]: https://lore.kernel.org/r/202108210311.CBtcgoUL-lkp@intel.com/ >> [2]: https://lore.kernel.org/r/20210824022640.2170859-1-nathan@kernel.org/ >> >> Signed-off-by: Nathan Chancellor > > Thanks for the patch! Do you need to re-ping, rebase, or resend that > other series? > Reviewed-by: Nick Desaulniers I assume you mean the series below rather than above? I sent this patch right after that series and it has one set of reviews so I am hoping the i915 maintainers will pick them up soon so this one can be applied afterwards or resent. Thank you for the review! Cheers, Nathan >> --- >> >> NOTE: This is based on my series to enable -Wsometimes-initialized here: >> >> https://lore.kernel.org/r/20210824225427.2065517-1-nathan@kernel.org/ >> >> I sent it separately as this can go into whatever release but I would >> like for that series to go into 5.15. >> >> drivers/gpu/drm/i915/Makefile | 10 ++++------ >> 1 file changed, 4 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile >> index 335ba9f43d8f..6b38547543b1 100644 >> --- a/drivers/gpu/drm/i915/Makefile >> +++ b/drivers/gpu/drm/i915/Makefile >> @@ -13,13 +13,11 @@ >> # will most likely get a sudden build breakage... Hopefully we will fix >> # new warnings before CI updates! >> subdir-ccflags-y := -Wall -Wextra >> -subdir-ccflags-y += $(call cc-disable-warning, unused-parameter) >> -subdir-ccflags-y += $(call cc-disable-warning, type-limits) >> -subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers) >> +subdir-ccflags-y += -Wno-unused-parameter >> +subdir-ccflags-y += -Wno-type-limits >> +subdir-ccflags-y += -Wno-missing-field-initializers >> +subdir-ccflags-y += -Wno-sign-compare >> subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable) >> -# clang warnings >> -subdir-ccflags-y += $(call cc-disable-warning, sign-compare) >> -subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) >> subdir-ccflags-y += $(call cc-disable-warning, frame-address) >> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror >> >> >> base-commit: fb43ebc83e069625cfeeb2490efc3ffa0013bfa4 >> prerequisite-patch-id: 31c28450ed7e8785dce967a16db6d52eff3d7d6d >> prerequisite-patch-id: 372dfa0e07249f207acc1942ab0e39b13ff229b2 >> prerequisite-patch-id: 1a585fa6cda50c32ad1e3ac8235d3cff1b599978 >> -- >> 2.33.0 >> > >