Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp56241rwb; Fri, 19 Aug 2022 16:49:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7wadT+2Cmjsu6tmtRgNLGYQN7RYqTIlWr3sPH8rktwOypXwEzRjffP/2gAm/y2L0DX+zm2 X-Received: by 2002:a17:907:6890:b0:732:fcb8:909f with SMTP id qy16-20020a170907689000b00732fcb8909fmr6125632ejc.683.1660952990297; Fri, 19 Aug 2022 16:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660952990; cv=none; d=google.com; s=arc-20160816; b=JjXDRXaBooXBRdVbYWOtuX0gfexcOgwKSjRGXXu+dwVXeTr9PuX7Se3pgum7FtVoEG ED6sSqxq6mWLDWiK7FKuKR35Clzt+c+FhlcqUA2bx6n+Uw/RCfinUgYw8Ei+bLGFqpCx qyivj8ScLOBGCPv8jixkqTp/0NeAdRlL2SPgB8g8Wty9wMzp0TSNIH4W8biO0kwi8MLd tKIJrOvQG9SHwPbB2W2/gN/1ffodS6QOgVtWH8aIV/H/H1AakloS4IzJxx9i86sAbHbC CL3wioi5upgI1BkBL8C1DGWHwjAvIMZdEd6d0JjI3HVgB7rnRJ/9BldZXHcx1Dxo6bSo Qu2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Y7BwhUziN7Shv1IDBl73QA6DiHDSzdgJ+ZuTLbMJXkA=; b=iP+FOBYa2xdVJN0LMm/GIjrl1qp+PxrFeAOCGONAQ3ZNNrgblZi81k7HvS4qXs/Bfo QHvrkLij6NGoldiQmJn27xtN+ehQK/48y9nvXqUTI3y+uZb/FIYT7oi4m9oNlH49k4GA GlqEBv79El6ht+cO3cxDT4Y6xRwGXJ9WVeBP9o4lLmbRR5AQmXeVGYFqj9oZe6itkMi2 +EfHfydWqSURLbIhJPpv3yt6+2HPUN0vGw5abJiN8ZZBdweIMPD15zITTqIyJh8ZJGvi 4sA2xEPUmQG4wldG9sXWorWHTo4/dNbjJUIpQ1bB3XkAgwvuYThEOCieRIh7kHui1Cy1 8cyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ns54S2g0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a170906374b00b0073836811b33si3354349ejc.176.2022.08.19.16.49.22; Fri, 19 Aug 2022 16:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ns54S2g0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242166AbiHSXdU (ORCPT + 99 others); Fri, 19 Aug 2022 19:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241901AbiHSXdS (ORCPT ); Fri, 19 Aug 2022 19:33:18 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5658D25C9 for ; Fri, 19 Aug 2022 16:33:14 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id m3so2302433lfg.10 for ; Fri, 19 Aug 2022 16:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Y7BwhUziN7Shv1IDBl73QA6DiHDSzdgJ+ZuTLbMJXkA=; b=Ns54S2g0WBfzfkVQ7/nUOVRNeJaY6npkvHh5zPjpWOZ2JmKtTcTlturtO5zz/h6fyr e354YBuRd+kKsyTy14dJMoQYiD7ll25eIDfcdKLDeq82K7bGN+x/BXRWG4FsL0yhHHkj r+WE5mJQpLd9OcYg5Em0yjmJffK7BiDgDa5hiTS+XWT2Qso4P44deem8MyK77H7dTM4c r0mb92hdAoDu2oX0yWLCx5/ad3Gg9yHQ2rL0wm24k0guhLoRORzYID1pD3RAZ3hU6mDT ycg3m2U0UaA1iJN1rSSwPbjiarcDqYbxCY8/OjcHd2dqsUJSi/6oyQTwuEbg4NXcBzl3 LCIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Y7BwhUziN7Shv1IDBl73QA6DiHDSzdgJ+ZuTLbMJXkA=; b=TLu2X0nLKYudgWqEPuHKvenejXaMp9C5q1NOceRT6G3oQk9iyYwUANXvsCvg+ixaNy hloZF/IMZQTJavyhU1AUWS2zfApreKhwEhtDcFJfLokAenLJxcJGYOhwiRA+iyhSv3HP rSqrHB8u5uCjNCdsEIXgt/QU7ePFUghiQraAuwIK90I1idJJTMzRrIZZ9yhpo5MJmi9R FNRWy+L4+eFwfDWdl1ipsmBE8E6ULkrbjOyi+/K/gyQDckyBQ5qWI2E0dWTQB+ZUrTm1 Bj5Btw6AzZdjCR1aoOfs/k2VQVR+JdQgbzL38yIu5gg3vffxQoqBqzxcfnK3Y3Wcys61 /cHg== X-Gm-Message-State: ACgBeo3txPCwY3Re8krWbXng4RfCk8BNlAXwKevxSO2X6Kms1CdrzrID IPAuNsALmhFMJCcvdz7Twnaag1A3UCvN7CeUv8PuzA== X-Received: by 2002:ac2:4f03:0:b0:48a:6061:bd8e with SMTP id k3-20020ac24f03000000b0048a6061bd8emr3463711lfr.647.1660951992444; Fri, 19 Aug 2022 16:33:12 -0700 (PDT) MIME-Version: 1.0 References: <20220716084532.2324050-1-youngmin.nam@samsung.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 19 Aug 2022 16:33:00 -0700 Message-ID: Subject: Re: [PATCH] Makefile.extrawarn: add -Wformat-insufficient-args for clang build To: Masahiro Yamada Cc: Youngmin Nam , Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , hosung0.kim@samsung.com, d7271.choe@samsung.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 21, 2022 at 9:22 PM Masahiro Yamada wrote: > > On Sat, Jul 16, 2022 at 5:17 PM Youngmin Nam wrote: > > > > The -Wformat-insufficient-args for clang is useful to detect the situation > > when the total number is unmatched between format specifiers and arguments. > > > > Originally, this option is enabled by default(Link[1]), but it is disabled by > > -Wno-format explicitly so that we can't detect this unmatched situation. > > > > We can enable it by adding this option after -Wno-format. > > > > Link[1]: https://releases.llvm.org/13.0.0/tools/clang/docs/DiagnosticsReference.html#wformat-insufficient-args > > Signed-off-by: Youngmin Nam > > --- > > > Please let me hold on this patch because > I'd rather go straight to the removal of -Wno-format. > > https://lore.kernel.org/linux-kbuild/CAFhGd8pk+0XEz0tMiJcwMM7B3NYF=yF4cHW8A-6-81SgpKFPNw@mail.gmail.com/T/#m4becf6ed91f25217b59a840ed1829f36e49fe347 Let's see what the feedback on https://reviews.llvm.org/D132266 is. If it lands, I will send a series with this patch first, then wrap it in the else clause of a conditional like: if clang version >= 16 then enable -Wformat else enable -Wformat-insufficient-args. > > > > > scripts/Makefile.extrawarn | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > > index f5f0d6f09053..c23d7c286bad 100644 > > --- a/scripts/Makefile.extrawarn > > +++ b/scripts/Makefile.extrawarn > > @@ -48,6 +48,7 @@ else > > ifdef CONFIG_CC_IS_CLANG > > KBUILD_CFLAGS += -Wno-initializer-overrides > > KBUILD_CFLAGS += -Wno-format > > +KBUILD_CFLAGS += -Wformat-insufficient-args > > KBUILD_CFLAGS += -Wno-sign-compare > > KBUILD_CFLAGS += -Wno-format-zero-length > > KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) > > -- > > 2.34.0 > > > > > -- > Best Regards > Masahiro Yamada -- Thanks, ~Nick Desaulniers