Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3765192imu; Tue, 18 Dec 2018 03:55:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vv3r9FcchygYUY8Z5wxbdO019VR1nQkCBftFxRdH2zKLjGKFp3XXVptWXjr2/ycHbaOjIi X-Received: by 2002:a63:9f19:: with SMTP id g25mr15487076pge.327.1545134151136; Tue, 18 Dec 2018 03:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545134151; cv=none; d=google.com; s=arc-20160816; b=xPIw81Yi3kRugkhdJs9yFXnZ1iz/UR6Z69s638nDhS7ePjP06lnEqyH7d7rb1PuLXl sImAJ2RQre0PBZMvMTokhtnw9gdR4YkL0KrK4rfavKKrrMD6PJGZ+m1MwyyprQyyJu+d nH01VmWeblB1kFVWXeU6sStay7XQkQ6SkVcS4aUtcp2LZ6PqGxtXLtt7C2yabfolCdIC XEPfTniMX+pa3TbtRRI/+sxRi5BSjJ8MtYYNx3R8n8pnC9GsBoC1FFi7MJ+v4HcGG2J3 J3AI/aUaiZx6AA1kaM4fGUVeGFvbw85JXzvduZb2tlojlblkC2KNCFMpW5Ej4zG817bm BBOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version; bh=PnsMe8N+IJ8ByeyUkF2nl4EDgiwJQKoxdu//PJGa+zY=; b=h8viUi7Rp0nPNbc9NcYOWIB94kwxrHg7wze5e703tbdC7Cxz0zHWxDurSYJ1KAT8HA oh8TJMXgKdLjoWbVdXGWnbIb4WR5eEO2r2GdharI0050NMvsWu5HHIIy81wNbP9zubm/ fEVp1H3sSGRjvAT34P57iqVW5IT986rVNwO01ytKt0mw3IBsNI0lNGq50X9PejgDvIJG t2QdVOrtx5EB3IoTLDmTaihe+pPERys5uz5TkTebngj84FhOS7RMxbZaAE8MLYUUx7g4 1t4El752nr8psh92ZRaEQjK5Q0ND5wVHDuNFQf/e0O+yiPs9fAUKYwVwhEVoSBpxGJY8 i4zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f22si13123590pgm.81.2018.12.18.03.55.35; Tue, 18 Dec 2018 03:55:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbeLRLxQ convert rfc822-to-8bit (ORCPT + 99 others); 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