From patchwork Thu Oct 25 19:36:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10657015 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 0154113B5 for ; Fri, 26 Oct 2018 07:46:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E72F42B5AE for ; Fri, 26 Oct 2018 07:46:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D42642B57F; Fri, 26 Oct 2018 07:46:49 +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 7F9162B57F for ; Fri, 26 Oct 2018 07:46:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA7F96E40A; Fri, 26 Oct 2018 07:46:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5EE196E28B; Thu, 25 Oct 2018 19:36:21 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id n5-v6so6737129wrw.12; Thu, 25 Oct 2018 12:36:21 -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:mime-version :content-transfer-encoding; bh=jcp9mvv9nBmNO4dsscPgnoiWKk0gQuM1wRbUL7m4l0s=; b=gGGIYtgrXDAJvSpYEmQwH4nc6hQrgTz07uGQD6d3CLJSyEgKWLpr9lRECOncwIJj9r RgbCySMGX4OSP4BzKEgtc8o86tSchI1WLbuaRRT5R3rmjQhR5DVp5ta7OqWQZOpM2+97 rVLIdUrJJFOzdceY3oAD2D19gjhYRfbVFFmXz9Yenq2T7JpZN2Xa+Z2iYYjqnytTBVJn lwl5/tI54I4fKTBt6/AVpz6MIGLGyoGbJEL9mBGVxaeyM4jvJTuKI+yOC02fiyXe+Z0t W+MDxj0tjn9Xv0WyOwekyiTIb2niFkWTpQ/cw8VcnGfASccEWvBiXcPO2/P/PK5fO4LS SUaQ== X-Gm-Message-State: AGRZ1gL14zTukG4sQo/AMSvr2nHHpH+hFQSx1CpSIHtl5xGFJG/J5297 TSEtJIRcJ7MjU9creAtPpII= X-Google-Smtp-Source: AJdET5dCuMgckC5FcD9H/n0lxo9mI+LJbCR1JCk/0UMP5mx/jP8IuvPoWEkw2fPUZNhVPDsolnOemQ== X-Received: by 2002:a5d:4182:: with SMTP id m2-v6mr3422827wrp.8.1540496179603; Thu, 25 Oct 2018 12:36:19 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id p125-v6sm2455871wmp.2.2018.10.25.12.36.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 12:36:18 -0700 (PDT) From: Nathan Chancellor To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi Subject: [PATCH] drm/i915: Disable -Wuninitialized for intel_breadcrumbs.o Date: Thu, 25 Oct 2018 12:36:01 -0700 Message-Id: <20181025193601.11746-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 26 Oct 2018 07:46:32 +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: Nathan Chancellor , intel-gfx@lists.freedesktop.org, Nick Desaulniers , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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. This warning looks to be a false positive given that init_waitqueue_head initializes name before it is used. Rather than disable the warning for the full folder like commit 46e2068081e9 ("drm/i915: Disable some extra clang warnings"), just disable it for the one problematic file because it could be a useful warning for other cases. Link: https://github.com/ClangBuiltLinux/linux/issues/220 Signed-off-by: Nathan Chancellor --- 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 1c2857f13ad4..f36c420afb99 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -26,6 +26,7 @@ subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror # Fine grained warnings disable CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) +CFLAGS_intel_breadcrumbs.o = $(call cc-disable-warning, uninitialized) CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init) subdir-ccflags-y += \