Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp533569ybe; Thu, 5 Sep 2019 01:43:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEZpVV588KoIfa14BMBR1J6GOZsickwEU2EsRnVbZdycXeWSPw73r+VhMlW3S+t1N4lGh4 X-Received: by 2002:a63:cb4b:: with SMTP id m11mr2156530pgi.49.1567673022968; Thu, 05 Sep 2019 01:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567673022; cv=none; d=google.com; s=arc-20160816; b=jvNZsad1Aak7SmrUxB6exeYK6tphLSa4CRItgFoe+b5o3SHrMB4oH3xaVIPtQGCTtg R3+nixBoH51rYK4ePHNfVckUkKxf/OMQTFmntCM9f0JzX5HY8/uutc2x9cXNqBvby7YM H3EGQDuXjx18BDjCoDqBBCeWeL2UF/ZuBWzOYwrKI2wcTsVlq2UuriNB0AnDhgANUGwR VdqQgJOGsFJWVWcpMWH/DMQgLk3sey8bAvndtLK5Q9LUliRhFvNlft7te2NAgmmac3ik JTe3SRyKrJuzDYM3qn1gFrFa8x8ODS0/IvcVqN4NT56wU5bKUQacO2ac3hh1RME1yPmt rV9Q== 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; bh=AIQLXRbVyNYLq+ol22DsuLqLcT0DV8DAEZvd/28G2Y8=; b=euujHAiB1TwEMbAHdDSnhAHjqm5678XlJrU19lQY+b3W9gQekgox/gHaWhPV/NV8no 76IS74l0gFjr6O0Din7R3maYtQmvU7LHqQ5tfZwBrOtotL7pGllAu+1xiJ/M4Kz71Oz+ GWGcLpOl0B4L4f5NN1ola/6zFqHXEEPj2kAaBzvUNhTN73aKnobhptDFGD3agWisGwRU omdW6st901uN8ZMRjdxaWeZUHD6OzomdeFrZhXuUKLxdLuNYjPMoCJP8j8n/dRLSWEaz g03xxyN52bb5GPsvnxfVqi1Ej/STC1J5mS6z5PiLwJgGO7tD6b5A3NMkU9jp3ntUa9Xg U9lQ== 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 t132si1199617pgc.288.2019.09.05.01.43.26; Thu, 05 Sep 2019 01:43:42 -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 S1732003AbfIEIHA (ORCPT + 99 others); Thu, 5 Sep 2019 04:07:00 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:44223 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730809AbfIEIHA (ORCPT ); Thu, 5 Sep 2019 04:07:00 -0400 Received: by mail-qt1-f196.google.com with SMTP id u40so1708983qth.11; Thu, 05 Sep 2019 01:06:59 -0700 (PDT) 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=AIQLXRbVyNYLq+ol22DsuLqLcT0DV8DAEZvd/28G2Y8=; b=FpRpchdKvqMSkeJ/5sO8CMY+J41eGcJpVvUO/UgNZuOSlALFlDpcO48+hiau/B5PuP 08TnU2+DvodbwLUZe8hq6yMOV4HU3+YfKmwWnN2wBiLiOuqAFLMRl21Mn4lKQLBU7HEm CHwpvJdX65HhElRoArF/NQ7exDZe45eOFMd4mjM0TzoNaYGuazl1VmDvI3OM7oiDMYgF 7BNB98KVpSy2wJqdZDjxlmNWIYBQm7f2k4pa/aamWWsJ/ODQghE4AlZjkJ1Xl3xr/tZG 8rZ35EJuE5Ei+TeMEABSFUTmFmbsr0V+gnAtYVA3LCjnTMg3zw1qktQpUup9NXjun1II G4dQ== X-Gm-Message-State: APjAAAUSPGtBqx0zzdoanSpPnukavMkDOUmgSxY2bdf4JV/UUQP7x38u UEWU1hUSdU5PdZfiVSjCd5kMQ+aHeUdb/p1b2lc= X-Received: by 2002:ac8:5306:: with SMTP id t6mr2220290qtn.204.1567670819019; Thu, 05 Sep 2019 01:06:59 -0700 (PDT) MIME-Version: 1.0 References: <20190831162555.31887-1-yamada.masahiro@socionext.com> <20190904224050.GA82176@archlinux-threadripper> In-Reply-To: <20190904224050.GA82176@archlinux-threadripper> From: Arnd Bergmann Date: Thu, 5 Sep 2019 10:06:42 +0200 Message-ID: Subject: Re: [PATCH v3 1/2] kbuild: refactor scripts/Makefile.extrawarn To: Nathan Chancellor Cc: Masahiro Yamada , Linux Kbuild mailing list , Nick Desaulniers , Sedat Dilek , Michal Marek , clang-built-linux , "linux-kernel@vger.kernel.org" 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, Sep 5, 2019 at 12:40 AM Nathan Chancellor wrote: > On Wed, Sep 04, 2019 at 11:46:45PM +0200, Arnd Bergmann wrote: > > On Sat, Aug 31, 2019 at 6:26 PM Masahiro Yamada > > wrote: > > > > FWIW, I just found out I missed a bug that clang failed to warn about > > because of the -Wno-format. Apparently gcc warns only about type > > mismatches that result in incompatible calling conventions (e.g. > > int vs int64_t) but not smaller types (int, short) that get converted to an > > int anyway. Passing -Wno-format turns both off. > > > > Arnd > > Hi Arnd, > > This has been fixed in clang 10.0.0 but this areas has not been updated > as nobody has sent a patch yet: > > https://github.com/ClangBuiltLinux/linux/issues/378#issuecomment-524411147 Ok, that's good. I see that on clang-9, the documentation also mentions that -Wformat control -Wformat-extra-args -Wformat-invalid-specifier -Wformat-y2k -Wformat-zero-length -Wnonnull and -Wformat-security. We can probably turn these all on, regardless. The only warning that produces output here is -Wformat-security, and only in a couple of files (number of warnings per file from a few hundred randconfig builds): 384 kernel/trace/ring_buffer_benchmark.c 176 samples/trace_printk/trace-printk.c 174 kernel/debug/kdb/kdb_io.c 102 arch/x86/kernel/e820.c 80 fs/btrfs/check-integrity.c 67 fs/reiserfs/prints.c 63 fs/xfs/xfs_log_recover.c 54 fs/quota/dquot.c 53 lib/test_printf.c 39 sound/core/sound.c 28 arch/x86/kernel/cpu/mce/core.c 21 kernel/trace/preemptirq_delay_test.c 19 sound/core/seq/seq_clientmgr.c 17 sound/pci/hda/hda_bind.c 16 sound/usb/mixer_quirks.c 16 arch/x86/kernel/cpu/mce/amd.c 15 net/smc/smc_ism.c 12 kernel/debug/kdb/kdb_main.c 8 net/netfilter/nf_conntrack_helper.c 4 kernel/power/suspend_test.c 3 sound/pci/rme32.c 3 net/dsa/dsa.c 2 sound/pci/rme96.c 1 sound/soc/sof/intel/hda-codec.c 1 sound/pci/korg1212/korg1212.c Arnd