Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp894444ima; Wed, 6 Feb 2019 10:03:25 -0800 (PST) X-Google-Smtp-Source: AHgI3IZU32dFF97dz31brGvrxcsPYB/OAJou5TQ6SNI1nI+lzqmfLNNWIRX1lKXdJ6RQthfLusmM X-Received: by 2002:a65:608d:: with SMTP id t13mr10942446pgu.129.1549476205194; Wed, 06 Feb 2019 10:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549476205; cv=none; d=google.com; s=arc-20160816; b=RK7jd4gh0aV79TpqeWSRLVYurwqJViTGJe8mbB+xubFOmp9pOQJSNG1WD2WeU0lsTB PdgGIjuxuKKc6fnrMU12Ho3CMWWd60JM2Viupiz0qj1HjAlhUGl8uWoxQxogPQVCp2i5 TXCm/vxcJDO03k9O+ASSfq9hUr784DaYM05a6reHZpHqEpMc9OZQYcsMfHFxzL41dBR2 sZee3uS0QI+ofQz0DTREOgUabmiC/yPPh98vzmBcPt+SVWpnsOd2+xH9w1aSypP8BGBn xNRaj65EFAMr9vkFopk2Vlmb6TZPaf9bWqOATyvmwmEW7vlL2V2XtTRuut8P7kU5QS/w fr/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9pExDNk1d86YLl7tWUwoe5QG+vMoTttRKZh0dm7/6yc=; b=NQnfUAqW44h8DFnVXDn7sn5Dbv/jG7ZxuCsg9kI+GDpHzaWi9lmD/XF7eFqGSrl9+x fortwOliQzxG7IbTj8JBFXugkPKtB+EJVQusvVJc0T5FZGBEzT8tJxahZDmNVCHa46/L VeLBo6+DmEmuxcBfC4zN3hHeAeE7GzK6BvOEf1SjAgukLyoSOi5t7YAYQHWh1rXQZHHh +cu6mRQLzGeI6PcMWK/dKYA5zK+9RHsAMDY5uGqyXMn/SOHReVtAO+knFq+Gs2Lh/+Ar 0fhoE+PxCLPViNS7JwzCvvZjbZ7/nLFMIhFv3TNfZp8Dtq2b7mrH6TGc8le3E5XFtHBu Xy7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fFblG7K0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24si6297775plp.304.2019.02.06.10.03.02; Wed, 06 Feb 2019 10:03:25 -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; dkim=pass header.i=@chromium.org header.s=google header.b=fFblG7K0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729737AbfBFRc2 (ORCPT + 99 others); Wed, 6 Feb 2019 12:32:28 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34652 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727602AbfBFRc2 (ORCPT ); Wed, 6 Feb 2019 12:32:28 -0500 Received: by mail-lf1-f66.google.com with SMTP id p6so6015861lfc.1 for ; Wed, 06 Feb 2019 09:32:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9pExDNk1d86YLl7tWUwoe5QG+vMoTttRKZh0dm7/6yc=; b=fFblG7K09X25nVyVAMv0PHZAjIon8Y5Y4efBq7/5BRp7fmj+J6bjipjQQaVvhVMaSU T2BG3NrQiONgwHCGjYWlBWQEtrY2SHiGlh0Pok8V/q66N4+fo/f5NS4z4aYduHq2Vk5t awx7O47jvYb7LmcgzFuKQG97SSuRfkTkPh2p0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9pExDNk1d86YLl7tWUwoe5QG+vMoTttRKZh0dm7/6yc=; b=AMrIbX+CmVuSpUbW5BP4bdgtN3ODznvrUrSpU/A5my/uIZORlLSFHLniFb5NRlLVrE S8z2xGOKLpgMQPojzOjkiq+EWzC/5aPPRpSpq582/T17JhTS2BeWSx+AsAKTiECXXXdZ Sm99gqExdwuTE/oCraW73DgqYV3+Cw+YqbiIJtjKCsgIlXlhb6MprZ+ngbulre0cjbUg Ka/Yybwud4/9+xoZfdwR3sYXoV3/JGz9VXKRRSVZ6ODK0xjkeQ8Fo1Had2g7D5lGsWWK GB+1cTbsMhTo7tpSRHE6Mz5QOdkP1It626jZ7sO9A6pH75LKGFEgCZqT4dQNNf4KqmAq 25Hg== X-Gm-Message-State: AHQUAubDY49QvE+aNBjHQODQYrSidVKcOEyagV7JintEBpf+Tla7Ff4P sgNOHw/LZXtJraupiz8Moa7x2Z+sOFE= X-Received: by 2002:a19:cfd5:: with SMTP id f204mr6787148lfg.65.1549474345725; Wed, 06 Feb 2019 09:32:25 -0800 (PST) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id q26sm140351lfc.79.2019.02.06.09.32.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Feb 2019 09:32:24 -0800 (PST) Received: by mail-lf1-f45.google.com with SMTP id b20so5945767lfa.12 for ; Wed, 06 Feb 2019 09:32:24 -0800 (PST) X-Received: by 2002:a19:6001:: with SMTP id u1mr2095586lfb.56.1549474344072; Wed, 06 Feb 2019 09:32:24 -0800 (PST) MIME-Version: 1.0 References: <20190201210853.244043-1-jflat@chromium.org> <20190206164528.GA8925@archlinux-ryzen> In-Reply-To: <20190206164528.GA8925@archlinux-ryzen> From: Jon Flatley Date: Wed, 6 Feb 2019 09:32:12 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild, LLVMLinux: Don't suppress format warnings To: Nathan Chancellor Cc: Masahiro Yamada , jflat@chromium.org, Linux Kbuild mailing list , Linux Kernel Mailing List , Michal Marek , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 6, 2019 at 8:45 AM Nathan Chancellor wrote: > > On Tue, Feb 05, 2019 at 05:26:05PM +0900, Masahiro Yamada wrote: > > On Sat, Feb 2, 2019 at 6:10 AM wrote: > > > > > > From: Jon Flatley > > > > > > gcc produces format warnings that clang suppresses. To keep behavior > > > consistent between gcc and clang, don't suppress format warnings in > > > clang. > > > > > > Signed-off-by: Jon Flatley > > > --- > > > > Applied to linux-kbuild. > > Thanks. > > > > > > Hi Jon and Masahiro, > > Just as a heads up, this introduces a ton of warnings (duh). Isn't the > typical plan behind turning on warnings that were disabled to build with > 'W=', fix them all, then turn them on so as not to pollute the build? > > Log file: https://gist.github.com/443db156e56cd3c0f6b21d9d77728d80 > > Note a big chunk of them come from one scnprintf call in > include/linux/usb/wusb.h but still, there are many other warnings that > make quite a bit of noise. Some seem relatively easy to fix, which I > suppose I will try to tackle soon. > > Thanks, > Nathan > Hi Nathan, This was definitely not my intention. I noticed the added warnings this morning and was considering calling for a revert on this patch. The intent was to match the behavior of gcc, as it has -Wformat enabled. It was rather naive of me to assume the behavior of -Wformat would be the same in both gcc and clang. Indeed, it seems gcc is more permissive about what format substitutions it allows. For example passing int to the "%hu" format specifier is fine in gcc under -Wformat but produces a warning in clang. Maybe this was the motivation for adding -Wno-format to clang in the first place. This difference is puzzling to me, and I wonder if it's by design. Considering the whole point of this patch was to sync up this behavior between gcc and clang I am OK with reverting this. Thanks, Jon > > > > > > > scripts/Makefile.extrawarn | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > > > index 768306add591..94daf4e1fc73 100644 > > > --- a/scripts/Makefile.extrawarn > > > +++ b/scripts/Makefile.extrawarn > > > @@ -68,7 +68,6 @@ else > > > ifdef CONFIG_CC_IS_CLANG > > > KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides) > > > KBUILD_CFLAGS += $(call cc-disable-warning, unused-value) > > > -KBUILD_CFLAGS += $(call cc-disable-warning, format) > > > KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) > > > KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) > > > KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) > > > -- > > > 2.20.1.611.gfbb209baf1-goog > > > > > > > > > -- > > Best Regards > > Masahiro Yamada