From patchwork Tue May 1 18:24:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10374293 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 CAAA060384 for ; Tue, 1 May 2018 18:25:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA17028D32 for ; Tue, 1 May 2018 18:25:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADA2428D3E; Tue, 1 May 2018 18:25:08 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 7377228D2F for ; Tue, 1 May 2018 18:25:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 564BA6E0B4; Tue, 1 May 2018 18:25:04 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id D47576E054 for ; Tue, 1 May 2018 18:25:02 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id z4-v6so8797351pgu.13 for ; Tue, 01 May 2018 11:25:02 -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=jsLpU+tHDdLnE8eY7/YtX41g9WL7/5A4gPK20wxIK8k=; b=kzS1vB12bTGdWZVnbaTR3cAVDZ90fYfsXpbZtDkKQGV99DKNBAqby5pySGdXNRImha g6grsoNYeDFxcrcFrY4mabsXcPgNQTQv2h5tyL/TCdMjTz8l4/JreJn1bFJ2KGC/2/Xz fSwnFEG0DS018juJ8MO9iIUmyLnoVkAWklYPWXn0n3YSAZMZP0RVKv+6AxZAWO1dM5T/ VfhXJP3hEnfNxSM89oQpJ2pdBYcU0r3+qcNaRA6Km5u+cz7tq1+wDFRc4/jdi7mGpVBU StD/Ns+Y4E4V8EsQs7LtWSyVNyFCPpjx4m7XY3jcMmDx/bDy/NIXOp7dP/JlzwElKiBq zA8Q== X-Gm-Message-State: ALQs6tCjXBLzBvq7MLyKp6MnwnTx+I4WkTzAwb68BUrolOqJ87KqPQA/ fUC276yw9naR/s4Gcbp1i7CV/Q== X-Google-Smtp-Source: AB8JxZrKgr59BaOAJr5qUFaJCf2JhxY0NNSDkDR625l5C+34xBkDmMTtbLbp+FCl9yPdupZkmloSmg== X-Received: by 2002:a17:902:33a5:: with SMTP id b34-v6mr17287203plc.232.1525199101240; Tue, 01 May 2018 11:25:01 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id z10-v6sm15324913pgz.73.2018.05.01.11.25.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 May 2018 11:25:00 -0700 (PDT) From: Matthias Kaehlcke To: Chris Wilson , Jani Nikula , Rodrigo Vivi , David Airlie Date: Tue, 1 May 2018 11:24:40 -0700 Message-Id: <20180501182440.70121-1-mka@chromium.org> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog Subject: [Intel-gfx] [PATCH v3] 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. Signed-off-by: Matthias Kaehlcke Reviewed-by: Chris Wilson --- Changes in v3: - don't disable -Wunneeded-internal-declaration , the only occurrence can be fixed in the code - removed 'Fixes' tag, since backporting is not necessary 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 9bee52a949a9..dfe01452c8d1 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -18,6 +18,10 @@ 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, initializer-overrides) subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable