From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21543C43387 for ; Tue, 18 Dec 2018 11:53:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA37D2184C for ; Tue, 18 Dec 2018 11:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726651AbeLRLxQ convert rfc822-to-8bit (ORCPT ); Tue, 18 Dec 2018 06:53:16 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:52909 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726403AbeLRLxQ (ORCPT ); Tue, 18 Dec 2018 06:53:16 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 14957832-1500050 for multiple; Tue, 18 Dec 2018 11:53:12 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Nathan Chancellor , Nick Desaulniers From: Chris Wilson In-Reply-To: Cc: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, LKML , Matthias Kaehlcke References: <20181025193601.11746-1-natechancellor@gmail.com> Message-ID: <154513398652.1108.7150969916024071452@skylake-alporthouse-com> User-Agent: alot/0.6 Subject: Re: [PATCH] drm/i915: Disable -Wuninitialized for intel_breadcrumbs.o Date: Tue, 18 Dec 2018 11:53:06 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Nick Desaulniers (2018-10-25 23:20:58) > On Thu, Oct 25, 2018 at 12:36 PM Nathan Chancellor > wrote: > > > > 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 > > cc author/reviewer of 46e2068081e9. > > I'm fine with the patch as is, unless others prefer to disable it for > the whole subdir? We could be playing whack-a-mole in the future > disabling this warning for other translation units. Yes, exactly this since the warning is generated by a core header and a fairly common pattern its use is not restricted to any single file. (Will not all selftests similarly explode?) The other false-positive clang-6 gave was for local_clock_us(). Presumably that one is fixed? -Chris