Received: by 10.192.165.148 with SMTP id m20csp4166145imm; Mon, 30 Apr 2018 13:02:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrj5xtQZOF0zonBayBDU+X55DqeSxOWnrLopW6LZhzcub61yjRwxa+2f7RNevLEdUD4jmuH X-Received: by 10.167.131.92 with SMTP id z28mr13220277pfm.237.1525118552335; Mon, 30 Apr 2018 13:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118552; cv=none; d=google.com; s=arc-20160816; b=BBo1LALIl9qvTYKWRSOe53WYO8AgwH+4E68PtNlbA3DJIQY5ySXNSs5hZgW35EH8JT KlSrktvoHHP08P8JMog0nVFzPCbpj2pkU7OujLDFxvd9h36yiEF7xFL2OCDKmBBdY6fR D48hJshi0w0iSn8eEBPy/RmEaHtzQt1/KFVNfqw90Xy3VbARI17fdD093w8plyRSG7Vr +DsSTwEYkhKk342EZNEt51rTHeEaSso1Rcj+5xiNOPOVol8cc08clVFKubRsjeJFEU1h bwhNcU7n78dmKC8NEoSGHZcwNKqeaLM0PSghG0ao9KIqsCh2vcLl9sGJDPLjxeanrQl2 hRwQ== 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:arc-authentication-results; bh=/LY92+a65sftE/5XKIUQ84OmrNmocS+106DXj/wsjPU=; b=qJSuPzIdIQPQs6asQsy7x72dQEVWtXclxBoHsiDbzrJ9IGJ+N84wjQseMVXYDK78aQ 5Iyd77wfPWFq3j76tP7vzOjBqaAuI/gfpiHB6wzFYx/RMV9AgISm+f5FGHxpYQHxPnFD wypLEesY3PHrz+jYMA4VnqGL0HcH1iRunSznap0959CB5mDOo9umT1czFRiGKPodOGvA jMvQyVjSmgBwuD95LdvNxG/YayRFVG0MrVmZAnifaliDpLchiZKvEnDQ/cbnKcGkSwkX CqfHkdydlqDT3sXwiFvhDkgZEo7YUkujYBdvtdBAPBkCiVnsDeb7+i/o/2Hhnm4fxRNT bIdg== 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 a71-v6si6648745pge.159.2018.04.30.13.02.17; Mon, 30 Apr 2018 13:02:32 -0700 (PDT) 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 S1756126AbeD3UCF convert rfc822-to-8bit (ORCPT + 99 others); Mon, 30 Apr 2018 16:02:05 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:56965 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755214AbeD3UCD (ORCPT ); Mon, 30 Apr 2018 16:02:03 -0400 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 11548900-1500050 for multiple; Mon, 30 Apr 2018 21:01:57 +0100 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: Matthias Kaehlcke , "Jani Nikula" , "Joonas Lahtinen" , "Rodrigo Vivi" , "David Airlie" From: Chris Wilson In-Reply-To: <20180430193119.GB133494@google.com> Cc: "Guenter Roeck" , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20180319191451.83910-1-mka@chromium.org> <20180430193119.GB133494@google.com> Message-ID: <152511850981.10429.1077865835761338509@mail.alporthouse.com> User-Agent: alot/0.3.6 Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: Disable some extra clang warnings Date: Mon, 30 Apr 2018 21:01:49 +0100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Matthias Kaehlcke (2018-04-30 20:31:19) > On Mon, Mar 19, 2018 at 12:14:51PM -0700, Matthias Kaehlcke wrote: > > 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. > > > > Fixes: 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set > > warnings to full") Do we need to backport this for a non-default build with a non-default compiler? > > Signed-off-by: Matthias Kaehlcke > > --- > > Changes in v2: > > - rebased on drm-tip > > - added comment indicating that disabled warnings are clang warnings > > > > drivers/gpu/drm/i915/Makefile | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile > > index 4eee91a3a236..9717c037b582 100644 > > --- a/drivers/gpu/drm/i915/Makefile > > +++ b/drivers/gpu/drm/i915/Makefile > > @@ -18,6 +18,11 @@ 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) Too much mixup in the code to be fixed overnight indeed. > > +subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized) Annoyingly it appears that clang has more false positives. > > +subdir-ccflags-y += $(call cc-disable-warning, unneeded-internal-declaration) Example? I don't recall this one, so don't know if we should just not fix it rather than suppress. I've used ignored-attributes, perhaps that was for the same cause. > > +subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) While we used per-file to restrict this one, I don't think we care that much for precision with clang as well. -Chris