Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp29216ima; Wed, 6 Feb 2019 16:30:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IayAGQbXrXsL3qukMOW2pZgXvaFAwaiNr6m7esyRi7A1FOuKv8UskYooN62U7kzGfa9nmkg X-Received: by 2002:a65:6658:: with SMTP id z24mr12262278pgv.189.1549499448177; Wed, 06 Feb 2019 16:30:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549499448; cv=none; d=google.com; s=arc-20160816; b=fGTGqNH2GUFC4Zkb7d+JdIyAovvnJrdEijxEyhYH2/SWXUu6d2G9h/GDfohKZDMh4f fLc2pBAq5XOsqPL8jqnUDVO0JQySQ4np2kGv7vpgiTKQVcYgpfkuxi5FO8834OEtpeWJ AFm3hsdh+93XUBvNWFqDMMj+6w+oiZoZuV+88tEEPOVkytaOzVzwXl+wnxlDHe32slJY AQonTuoJYC7Szj8n6anTrRbWwHSvSOUKDomuq3w511R5Tdx5G9q+4+w1KPqVkDq6Pn1C zGOcwXgsQ164mPulUOufSbB/V+upNAmsSThjb0RYSrqh3EnQXVDYTWMm5aULzoWsiWma s7ew== 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:dkim-filter; bh=EwH5dTt5nP6XelDBcWbQeMxBJ1kkNJ8BOJ+f4mT5SaQ=; b=nlTu/qh1Bm2g8DdcGB0QV9nH910nnBT1Im6Jna3je+Pnvx731rb+CatlvpS6RvakVO Y3XrR3NmAk5xickbXrHZax+T6ruRoUA1Gh3MzWoRnLRpFgtXCXvN5ANz9E1fA5ONgU2v 8ub8XSroCc3ozfVaickXtqMjpilcOZEeAhcSKuy9EtSjMVt48i1i2gTyeTU8/g9WPlIx kPv6zkidTr6HvljKEVdrdFS7MUY/+tPA5SqEXaoQx2pfpqBv1Q5JAJZ/zJfmw/GGx3Sz nRvXXxue99b40yVY/n7Oq9kxzXze4hFA9mb1o3pP3DJSOtznmkq0rRcEB9WIO4qFNlsV xunA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="SBGzYja/"; 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 y26si7680687pfd.25.2019.02.06.16.30.25; Wed, 06 Feb 2019 16:30:48 -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=@nifty.com header.s=dec2015msa header.b="SBGzYja/"; 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 S1726614AbfBGA2T (ORCPT + 99 others); Wed, 6 Feb 2019 19:28:19 -0500 Received: from conssluserg-01.nifty.com ([210.131.2.80]:49475 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbfBGA2S (ORCPT ); Wed, 6 Feb 2019 19:28:18 -0500 Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) (authenticated) by conssluserg-01.nifty.com with ESMTP id x170S4ux019775; Thu, 7 Feb 2019 09:28:04 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com x170S4ux019775 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549499285; bh=EwH5dTt5nP6XelDBcWbQeMxBJ1kkNJ8BOJ+f4mT5SaQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SBGzYja/xjkTf0/4MIOMD+f9glEIeD8MKi/Plgm/WJlpN4vvPtBWENuCDgYTGJnN0 vlbrDQTQ40Mo/xGIJxswd0sUFneYsdARCzQcB1hs7Kh+5naRGv7RV9bfAVCWhI8Tnt MAsPb/O1nsAjTgkRHV3l/yzyb3GM5ynvsMNZgS6f+CF2wUnymUUpxPkyQazbgiKZM/ d7DCzJatoLDp1fTt7sw1puc5iVJ8sLcOvCgk6T1VEeY1NUOjxmACRUkKH7tJT/C5Dt GOLJcTu54iHRx1y8KzZr3GiIYxo1OB4gcEUOUgPxx8nD6Lray868JWe5qE6WfKkBn6 CRlKo1WZu2vKQ== X-Nifty-SrcIP: [209.85.217.46] Received: by mail-vs1-f46.google.com with SMTP id s16so3603509vsk.4; Wed, 06 Feb 2019 16:28:04 -0800 (PST) X-Gm-Message-State: AHQUAuYWhrhYvbuRSCFdlzwYT4nE5rEC8LLusROCnK7D4KCdsDX7rmBn W/AU6XSIbxLx0KSbEEjvCQbwWt2q55W0tkRSQAc= X-Received: by 2002:a67:a858:: with SMTP id r85mr5270855vse.215.1549499283328; Wed, 06 Feb 2019 16:28:03 -0800 (PST) MIME-Version: 1.0 References: <20190201210853.244043-1-jflat@chromium.org> <20190206164528.GA8925@archlinux-ryzen> <20190206174339.GA19743@archlinux-ryzen> In-Reply-To: From: Masahiro Yamada Date: Thu, 7 Feb 2019 09:27:27 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild, LLVMLinux: Don't suppress format warnings To: Nathan Chancellor Cc: Nick Desaulniers , Jon Flatley , Linux Kbuild mailing list , Linux Kernel Mailing List , Michal Marek 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 Thu, Feb 7, 2019 at 9:24 AM Masahiro Yamada wrote: > > On Thu, Feb 7, 2019 at 3:03 AM Nathan Chancellor > wrote: > > > > On Wed, Feb 06, 2019 at 09:36:55AM -0800, Nick Desaulniers wrote: > > > On Wed, Feb 6, 2019 at 9:32 AM Jon Flatley wrote: > > > > > > > > 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 > > > > > > Oh boy, that's a lot. Too many to fix quickly IMO. > > > > > > > > > > > > > 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. > > > > > > > > My guess is that it has something to do with how the compilers > > internally handle certain specifier promotions (GCC probably just > > silently ignores the 'h' part of the specifier whereas Clang warns) but > > I didn't do any actual research into the matter. Probably should before > > looking into all of the warnings :) > > > > > > 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. > > > > > > Sorry, I'm late to this thread. What is it reverting; who authored > > > the original patch? Was it mka@chromium.org? > > > > > > > This patch is turning on '-Wformat' for Clang, which was disabled in > > commit 3d3d6b847420 ("kbuild: LLVMLinux: Adapt warnings for compilation > > with clang"). > > > > > > This difference is puzzling to me, and I wonder if it's by design. > > > > > > Probably; internally let's sync up with the Clang devs to understand > > > this difference more. > > > > > > > Yes, I do think it would be a good idea to turn this on eventually but > > it'd be wise to understand why Clang emits a warning but GCC doesn't. > > > > > > > > > > Considering the whole point of this patch was to sync up this behavior > > > > between gcc and clang I am OK with reverting this. > > > > > > Is this patch in -next, or has it already hit mainline? I think it's > > > better to revert, then start upstreaming fixes, then re-land it once > > > we're warning free. > > > > > > > It's in linux-kbuild/kbuild, it hasn't hit -next yet. > > > Right, it is just staying in my branch. > I will drop it. > > > I should have tested this carefully. Sorry. BTW, it would be nice if kbuild test robot could test building with clang ... -- Best Regards Masahiro Yamada