From patchwork Sat Mar 17 00:31:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10290561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A67B5602BD for ; Sat, 17 Mar 2018 00:32:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98B04290F7 for ; Sat, 17 Mar 2018 00:32:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D6F329108; Sat, 17 Mar 2018 00:32:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5BBD4290F7 for ; Sat, 17 Mar 2018 00:32:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 752606EC17; Sat, 17 Mar 2018 00:32:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id B7A5F6E10B for ; Sat, 17 Mar 2018 00:32:04 +0000 (UTC) Received: by mail-pl0-f68.google.com with SMTP id m22-v6so6829033pls.5 for ; Fri, 16 Mar 2018 17:32:04 -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=455tR+8UJLagwW8WnrZxBdi9yGt1E18bs+WSiJzY9QE=; b=FAQbwB8AjnISSWeGDqZN3WAN1SvFMhvRCzZ3m4t0rlljFBYFedMoW/7f12grZs5Dvn leIFDNgG9/Ooe4UX6zefU37eNJjTXLv50TUryvfIZS/cz3AoyuFVCEdIuLSzrOO5b8Pc iY15cAwIDm3+8/NI+4U1+9zD/ZVeHPtAE2BHhsBqhhpTKQ/UbxjR1JZB3w5STkrKDG8t uTI4Ry+S6a8u6hHkkRxtD1Tk9xD1t7V/xAHT1Ydrq7dVGdhOI/txZwsFx8WQ/cXusp86 8qNoZG29uQXZc+erH9cHZmonxHBMl5MM4iYHM78oisc/oeEUaIzkPWvbUR/CmYAKa9Gs g6Bg== X-Gm-Message-State: AElRT7Hypgu6nieZRerXjy9abrNn4b+fm5AEAz0XVAYX8vuR4JNpUTJW 24zyO3c9ldnyRYWdVVoWP/9TOQ== X-Google-Smtp-Source: AG47ELv7cGLxXX/84Cz4iB+6l+2iHbwago2ycHLs+6xwVTMuTqGRJCkTgn1tm4x+cCSyfBn0nlBeFA== X-Received: by 2002:a17:902:a9c7:: with SMTP id b7-v6mr3919731plr.190.1521246723757; Fri, 16 Mar 2018 17:32:03 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id h15sm16918166pfi.56.2018.03.16.17.32.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 17:32:03 -0700 (PDT) From: Matthias Kaehlcke To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie Date: Fri, 16 Mar 2018 17:31:51 -0700 Message-Id: <20180317003151.252750-1-mka@chromium.org> X-Mailer: git-send-email 2.16.2.804.g6dcf76e118-goog Subject: [Intel-gfx] [PATCH] drm/i915: Disable some extra clang warnings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guenter Roeck , intel-gfx@lists.freedesktop.org, Matthias Kaehlcke , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/i915/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 091aef281963..ad05796a96ba 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -17,6 +17,10 @@ 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 += $(call cc-disable-warning, implicit-fallthrough) +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