Received: by 10.213.65.68 with SMTP id h4csp37548imn; Mon, 19 Mar 2018 18:46:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELuy2NQX0MRpXbMV/ggvgcDBVL0UIYNEgjrViZBZd6DZNQBJljRY/LFpD2JN3/kjDIrx3E3A X-Received: by 10.99.119.15 with SMTP id s15mr10815182pgc.211.1521510364138; Mon, 19 Mar 2018 18:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521510364; cv=none; d=google.com; s=arc-20160816; b=FikW7Sa/otoCb0NccQrIbgf7WWZvssifMF0Uw44QhtKeLqX3TcVV2/L3fh9Y+WA5J7 QyEGorapqMm2jX8RbRYLckX6D5dgDPCWnjWMPeq7WjUJrtmzx0+kpAmg+zMjtQPmMaft BtAPTsGN8xXRwRwDTIuxkfQWtkBdEoFPLyTWuuVYfVeMissPOykopURazIrwNoG6N0Pw rD5h9zae7nZEbbkcdok8yZBLv94rizzxBTVMmy5SiG6pzHjxzkSkOggRIxO8mfXptoWb SzWg2NXadH12e3ExwMUt7DdZh331sJg8H1/T9db1UyusHOW+ZL/H1Cap1OP9R1mCRQ+p OBYQ== 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 :arc-authentication-results; bh=z01g8/q4UnzjbcIy9UeQOhbtdDFzCBKaU4oygZcBooY=; b=l2Zt+Z8MJshUdyqmxlH4/Npo5sgeYgpUtZBXJwPAveAJx9vWPiT4ABrSmL8ZKzEhcf NfUjC3M4kS2XOgcp0b1fpsaZX8UhnUafe7SzyvJX+s5mgJvNyjdnmy5GkTerD/vBK2Qy Im/DeRayn8GDO8YELgjTe0HEYzLBv/u/rJOANlH49BSOtX+Kmf3xUhuNzUnh+hvauqG6 EHL4YiKWMRpDGBv9QB0MPtW9mQCxzMiNWT3TwCOlKnxlD0RNM05F24l1KF/0cTXc4I/y sNpt0iE2QPYv6XHr05cqDT0m3HneyvNcxTeaAmpGagXdgmG0CyuOkWaT2kDJFtTFTN0i 9U3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si384655pgd.452.2018.03.19.18.45.50; Mon, 19 Mar 2018 18:46:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970891AbeCSTPM (ORCPT + 99 others); Mon, 19 Mar 2018 15:15:12 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:35353 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969607AbeCSTPG (ORCPT ); Mon, 19 Mar 2018 15:15:06 -0400 Received: by mail-pl0-f68.google.com with SMTP id p9-v6so8302761pls.2 for ; Mon, 19 Mar 2018 12:15:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z01g8/q4UnzjbcIy9UeQOhbtdDFzCBKaU4oygZcBooY=; b=HczU4OnQHfLAlxCZtUJIihD64Q7QNiFzDuCjnOCiSC2swvqugmTDfW6Va+KWsnWoZA e5Ef1NgzcepkH105ZFm2qfXkZKeq/ZmyCHtBSj55cbhiP6YAzK/a8gV4Q2gD18AVgqt6 KURmOsAOEaQ5LeS7q0oZDES/PxHZXj0cgM2CsWLmSZvVPgUXAXtUuVQK8SOSlWZMkw8U Uw7ik6DJfVFycTE7dMYVSH+M8unJ9JWYGjOFJlSxySwhHmV+53pO9odeJ2P1JDaLeuMA cQ4XcmTvE1QJNBriHXyWXgcV5lQ19a02WaKm2wRuKdvLoFDLNNXzEnEggHUJIgCSr5rq GX+w== X-Gm-Message-State: AElRT7EmFBzKk0L+iSo/GD+S1xUBPYscAV/gxwPhd7Rv1c/Tz7+BdrqU rrD6GB/lLlL7E95d4CHlZlrDGw== X-Received: by 2002:a17:902:670f:: with SMTP id f15-v6mr13758465plk.188.1521486906153; Mon, 19 Mar 2018 12:15:06 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id n15sm1217129pfa.35.2018.03.19.12.15.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 12:15:05 -0700 (PDT) From: Matthias Kaehlcke To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Guenter Roeck , Matthias Kaehlcke Subject: [PATCH v2] drm/i915: Disable some extra clang warnings Date: Mon, 19 Mar 2018 12:14:51 -0700 Message-Id: <20180319191451.83910-1-mka@chromium.org> X-Mailer: git-send-email 2.16.2.804.g6dcf76e118-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set warnings to full") enabled extra warnings for i915 to spot possible bugs in new code, and then disabled a subset of these warnings to keep the current code building without warnings (with gcc). Enabling the extra warnings also enabled some additional clang-only warnings, as a result building i915 with clang currently is extremely noisy. For now also disable the clang warnings sign-compare, sometimes-uninitialized, unneeded-internal-declaration and initializer-overrides. If desired they can be re-enabled after the code has been fixed. Fixes: 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set warnings to full") Signed-off-by: Matthias Kaehlcke --- Changes in v2: - rebased on drm-tip - added comment indicating that disabled warnings are clang warnings drivers/gpu/drm/i915/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 4eee91a3a236..9717c037b582 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -18,6 +18,11 @@ subdir-ccflags-y += $(call cc-disable-warning, type-limits) subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers) subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough) 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, sometimes-uninitialized) +subdir-ccflags-y += $(call cc-disable-warning, unneeded-internal-declaration) +subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable -- 2.16.2.804.g6dcf76e118-goog