From patchwork Tue Aug 24 23:22:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12457343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6923C4338F for ; Wed, 25 Aug 2021 12:16:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EF6460238 for ; Wed, 25 Aug 2021 12:16:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6EF6460238 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC65589857; Wed, 25 Aug 2021 12:16:53 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB239895E2 for ; Wed, 25 Aug 2021 12:16:52 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10086"; a="214385964" X-IronPort-AV: E=Sophos;i="5.84,350,1620716400"; d="scan'208";a="214385964" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 05:16:52 -0700 X-IronPort-AV: E=Sophos;i="5.84,350,1620716400"; d="scan'208";a="527238420" Received: from mburkard-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.213.64]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 05:16:51 -0700 Resent-Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Resent-To: intel-gfx@lists.freedesktop.org Resent-From: Jani Nikula Resent-Date: Wed, 25 Aug 2021 15:16:48 +0300 Resent-Message-ID: <87mtp5en2n.fsf@intel.com> Received: from linux.intel.com [10.54.29.200] by jnikula-mobl3.ger.corp.intel.com with IMAP (fetchmail-6.4.0.beta4) for (single-drop); Wed, 25 Aug 2021 10:05:10 +0300 (EEST) Received: from fmsmga002.fm.intel.com (fmsmga002.fm.intel.com [10.253.24.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id A290D5808AC; Tue, 24 Aug 2021 16:23:08 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6200,9189,10086"; a="536040427" X-IronPort-AV: E=Sophos;i="5.84,348,1620716400"; d="scan'208";a="536040427" Received: from orsmga102-1.jf.intel.com (HELO mga09.intel.com) ([10.7.208.27]) by fmsmga002-1.fm.intel.com with ESMTP; 24 Aug 2021 16:23:08 -0700 Authentication-Results: mtab.intel.com; spf=None smtp.pra=nathan@kernel.org; spf=Pass smtp.mailfrom=nathan@kernel.org; spf=None smtp.helo=postmaster@mail.kernel.org; dkim=pass (signature verified) header.i=@kernel.org; dmarc=pass (p=none dis=none) d=kernel.org IronPort-SDR: 3LbhXxnAP6vdCjL9lcmG6Uy3dpZ3THPTAkTCBRPIsiQwMWAUgs8/ld+7uQX6cfVjWr94PbFqP/ Xd3Px98iIiWRZrWxWY8sNxx6T0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+cxWOiD4bosu7wfefOKFeKysbDGE7Nj+4t O6/TuACg/eZWtoyJHAAUdldXprXcMizmiofvHlaCjSzlOUDx1rahwI= IronPort-HdrOrdr: A9a23:APtn7qr04UhMEOiGMl0a5P4aV5oteYIsimQD101hICG9vPb2qy nIpoV+6faQslwssR4b+OxoVJPsfZq+z+8W3WBuB9eftWDd0QPCEGgI1+XfKlPbdxEWjtQttp tIQuxGAMD7DEZ9lsS/yw+keuxQpeW6zA== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=McAfee;i="6200,9189,10086"; a="217420588" X-IronPort-AV: E=Sophos;i="5.84,348,1620716400"; d="scan'208";a="217420588" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from mail.kernel.org ([198.145.29.99]) by mtab.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2021 16:23:07 -0700 Received: by mail.kernel.org (Postfix) with ESMTPSA id 36A46610F8; Tue, 24 Aug 2021 23:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629847387; bh=4ZASDukXEFD6gzQ3txH7gkEOWmXTrxFmwK+P5dWdDlQ=; h=From:To:Cc:Subject:Date:From; b=XeCbBM0ZbkYIgSeNifwC91fAm1WEGYJ4JuxoYgQNpeKuCb0Ywt2jQyVCfiqNSOueh PPdJiAzTR+c1jJ4HFcOC+MJRftf2zrRXXBlxWvg8dA4wmqwd61xMesXxsEJX+F1TYP 6Lx6yT8AorZRbQFNNprX7Jhh1VX4YBaY5HO1/wbxzdCJ5hjGvL2VsEruzzHsgRLJ+s w1BH2Sm81RjXH/WrbEl6Ov/4Sd110xIuXb69BxzYYoXDxdGe/yrY83+A74mNIoT4Le rL5tDOhGF2CluFIaYjVoCy9iNfa/vTbP7cocrExi24clP7R+jaaH1n7G/wcee7q1IR DrlnnY64ASetQ== From: Nathan Chancellor To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi Cc: Nick Desaulniers , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, llvm@lists.linux.dev, Nathan Chancellor Date: Tue, 24 Aug 2021 16:22:38 -0700 Message-Id: <20210824232237.2085342-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Subject: [Intel-gfx] [PATCH] drm/i915: Clean up disabled warnings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 Reviewed-by: Nick Desaulniers --- 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(-) base-commit: fb43ebc83e069625cfeeb2490efc3ffa0013bfa4 prerequisite-patch-id: 31c28450ed7e8785dce967a16db6d52eff3d7d6d prerequisite-patch-id: 372dfa0e07249f207acc1942ab0e39b13ff229b2 prerequisite-patch-id: 1a585fa6cda50c32ad1e3ac8235d3cff1b599978 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