From patchwork Sat Jan 26 07:11:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10782585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41C541390 for ; Sat, 26 Jan 2019 20:35:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 311822A411 for ; Sat, 26 Jan 2019 20:35:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 259562C049; Sat, 26 Jan 2019 20:35:12 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 E193C2A411 for ; Sat, 26 Jan 2019 20:35:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F8BE6E623; Sat, 26 Jan 2019 20:34:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1940D6E065; Sat, 26 Jan 2019 07:13:42 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id b3so9113120ede.1; Fri, 25 Jan 2019 23:13:42 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=J0kp8B9HmB+wcP5oDChY0w57/hqJWzBplit1QEBozDs=; b=SEpYsFAG9/VQZPZK4jsyLEGv9Kv7lVRZooLAbI9A7zrnWrVZVBGoQUW8YtUYh/rQGE G/+msWqKStRq6rrpzXg+ckmjr987r8++H15OXP/d+yIelbyBaiB6tEzG4gKGuEtOHLpT bFoh7fDqGlSGHgGZ+fY9aeEi4QvfD0nlrb94R81V+/bOjyOpt0ExhwG1NVWSlqumqat7 DQDT191Tnmxne91elrw8g9e9Ht2vvRgRbwmq97fifdvjKhIGOFXjeawTJXpfWbXmXNxT sdvBTmFtdDZCW6pEU3NSW0rRDB8XyVHFg/P85nfSYcgrYhR68XUwQV5V4vGQ85W/oTOy XjZA== X-Gm-Message-State: AJcUukd6LK8AVfaiA1q4+L7umcQ5B6MtLP3a/7mfesTBePYyooTnlkg3 KfZj3cuvOMv/Pf1IcCC7eZc= X-Google-Smtp-Source: ALg8bN65vgYyS6424V+SJz3qZ4N77S4UNLql7LRB25on3npDBWeIpeJF0tc5zt2rg36QOoyrxqtXSQ== X-Received: by 2002:a17:906:f212:: with SMTP id gt18mr12313480ejb.201.1548486820395; Fri, 25 Jan 2019 23:13:40 -0800 (PST) Received: from localhost.localdomain ([2a01:4f9:2a:1fae::2]) by smtp.gmail.com with ESMTPSA id k31sm13148692ede.5.2019.01.25.23.13.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 23:13:39 -0800 (PST) From: Nathan Chancellor To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi Subject: [PATCH v2] drm/i915: Disable -Wuninitialized Date: Sat, 26 Jan 2019 00:11:23 -0700 Message-Id: <20190126071122.24557-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Patchwork-Bot: notify X-Mailman-Approved-At: Sat, 26 Jan 2019 20:34:37 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Nick Desaulniers , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matthias Kaehlcke , Nathan Chancellor Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This warning is disabled by default in scripts/Makefile.extrawarn when W= is not provided but this Makefile adds -Wall after this warning is disabled so it shows up in the build when it shouldn't: In file included from drivers/gpu/drm/i915/intel_breadcrumbs.c:895: drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c:350:34: error: variable 'wq' is uninitialized when used within its own initialization [-Werror,-Wuninitialized] DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq); ^~ ./include/linux/wait.h:74:63: note: expanded from macro 'DECLARE_WAIT_QUEUE_HEAD_ONSTACK' struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) ~~~~ ^~~~ ./include/linux/wait.h:72:33: note: expanded from macro '__WAIT_QUEUE_HEAD_INIT_ONSTACK' ({ init_waitqueue_head(&name); name; }) ^~~~ 1 error generated. Explicitly disable the warning like commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings"). Link: https://github.com/ClangBuiltLinux/linux/issues/220 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers --- v1 -> v2: * Rather than disable the warning for the problematic folder, disable it for the entire folder like Matthias's commit. drivers/gpu/drm/i915/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 8300efe60fe1..210d0e8777b6 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -22,6 +22,7 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable) 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-y += $(call cc-disable-warning, uninitialized) subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable