Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp899960iol; Thu, 9 Jun 2022 17:06:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzspeBHhw8FkHnjn/ZO9dniClrxEDXoYdnF3JLXzme1/ACMyno2I7WCLEJwCfI4WmEDiwAA X-Received: by 2002:a17:903:1c3:b0:166:303e:124a with SMTP id e3-20020a17090301c300b00166303e124amr41171838plh.7.1654819562180; Thu, 09 Jun 2022 17:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654819562; cv=none; d=google.com; s=arc-20160816; b=EjdLPCKCVO1s1sFvlsPuF0d7+Sz11T2eV2F2F7jRJ3pv6kyLMLyiLOaYIYj3dAgzyS afa/Bjhs8tg2NRoFb+MBV3tX5D/jo2awkfI+Klb77DQm/v1ur5zvrs+FTgUvwEAF9f09 O6ZIqHx6Z4ZPXextrITZ1kbwAv1k0yx8wnO9MQximqrvQx5hWsvBU4sBGwK4n0Xm7lmp ztLoyy4v5wjfaWj7SFP94d7GvPMr8dmhYKgfVcCK3wZ4ssjgdfTi2f5k3QopqiSvk2s9 ech9oV1qnYuP+G02DdeBo+g64B/ye+kV75VSB2xCJycjnOqChpMhFD0hOu9uz3Bt11YN AfxQ== 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=+qQsabkwxRvA8bdaAfDmJWrhJnuevA/KFdg/I1GgKtI=; b=iqn5w2pDnp9m7BnnTswtdvi3AuWksKqJbTKeldvGj+onT6qo3jnhUoX7eRfEU44Y/t AFIp/X5aIIzV8CW1Ou7UqzRyuVPyWXrnzGNXlZWOtRNUFIyGmPOpkK1Hr3QMwwNBXdK7 e9cJf3sOnvxGnNcDhpMaoG0/qqDZdFps1zDcsjlh1R6iCQF2xswcjnd7970x0zKfFud/ wfcOC1WfR0aKSS2SJQKqGvKUI97Ldl751HucaHxnLbnYpvc2xGjTJauGYNs1ZnUbHlcl u/EcRQN+sXn7+jb4lwsYDHCT76phN4zFpL6R9D1l0G5ABzd+GeUMsp49gk/SaMxE+dRZ 61Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="Ild0j7K/"; 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 w70-20020a638249000000b003fe34756dfdsi7930467pgd.678.2022.06.09.17.05.48; Thu, 09 Jun 2022 17:06:02 -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="Ild0j7K/"; 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 S1344827AbiFIXQc (ORCPT + 99 others); Thu, 9 Jun 2022 19:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240898AbiFIXQa (ORCPT ); Thu, 9 Jun 2022 19:16:30 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35E193C0E94 for ; Thu, 9 Jun 2022 16:16:29 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id be31so40291509lfb.10 for ; Thu, 09 Jun 2022 16:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+qQsabkwxRvA8bdaAfDmJWrhJnuevA/KFdg/I1GgKtI=; b=Ild0j7K/fhaVoC0PM7iI7pWdMAhRoR7/W2DRfNt0y6B95s4E9BAdtVXpgi3bEW9uNf AG1lgqOnQ2uv5vAvry2j8xPExVeLJ3BYnAE/tN+xXqHuPln6DSb5D7skU1STvZI/NDhW jtR8Pxq27ZSax7URoP+iTQwlBmGjk0LFf4D0uom1Imt1fNNlM84d4KYNh2dTlJaTBsbT JVm5nxYhNIVv0OxKdscaj9QMvA2PvsOaMEbHHEGSiRoofkVzd7gclfaU8PJEykQKLQma 53nit31M3stTWvFisr1YokQQjCrMXni13o6jwb6NDhQT5srtIccNwD3iLK4QBnuEEitd 6fKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+qQsabkwxRvA8bdaAfDmJWrhJnuevA/KFdg/I1GgKtI=; b=YUH9PpcdydKc9ojBn5xbadJnH6SNjy/fGvRwhc4jwzPBPsoYwVuAGEd9+YyfakzBej 0PIwEoUPFvkyLZPQ+bHyuSy45I//HnBuSdHEekmom+ywTPOKFdda8JYR3kaUCBK058tN +1clWNpQrl+/1esWf5Aat1CbIhnjGAmHY3XOKCNu0CnrCGEnaYj5JrcJ0a9aGGY4aT4V YPkJSEMeVSyGLZijg8PONmnsahiMDNZPOtI5XbUfxOtLydAx0FbrB382Rc6PwD8Th/09 HqjBs2n8PkeEGjCNPUMlb5Zy19ZGeGl+AObB1xVNSFgc5fvGj3G7jukYehMeFIAIxgz2 RJ8Q== X-Gm-Message-State: AOAM531OitemMjktv6b3UXXO13qacKHbitAvziRU1L3N3var9xBWb40p 29r4qm8NFIYRO+DbLrfcF303U84Ko6Nturv/E6O1 X-Received: by 2002:a05:6512:280a:b0:47a:e70d:63e9 with SMTP id cf10-20020a056512280a00b0047ae70d63e9mr5068916lfb.288.1654816587358; Thu, 09 Jun 2022 16:16:27 -0700 (PDT) MIME-Version: 1.0 References: <20220609221702.347522-1-morbo@google.com> <20220609152527.4ad7862d4126e276e6f76315@linux-foundation.org> In-Reply-To: From: Bill Wendling Date: Thu, 9 Jun 2022 16:16:16 -0700 Message-ID: Subject: Re: [PATCH 00/12] Clang -Wformat warning fixes To: Jan Engelhardt Cc: Andrew Morton , Bill Wendling , Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Phillip Potter , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Jan Kara , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jaroslav Kysela , Takashi Iwai , Nathan Chancellor , Nick Desaulniers , Tom Rix , Ross Philipson , Daniel Kiper , linux-edac@vger.kernel.org, LKML , ACPI Devel Maling List , linux-mm@kvack.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, Networking , alsa-devel@alsa-project.org, clang-built-linux 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=ham 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, Jun 9, 2022 at 4:03 PM Jan Engelhardt wrote: > On Friday 2022-06-10 00:49, Bill Wendling wrote: > >On Thu, Jun 9, 2022 at 3:25 PM Andrew Morton wrote: > >> On Thu, 9 Jun 2022 22:16:19 +0000 Bill Wendling wrote: > >> > >> > This patch set fixes some clang warnings when -Wformat is enabled. > >> > >> tldr: > >> > >> - printk(msg); > >> + printk("%s", msg); > >> > >> Otherwise these changes are a > >> useless consumer of runtime resources. > > > >Calling a "printf" style function is already insanely expensive. > >[...] > >The "printk" and similar functions all have the "__printf" attribute. > >I don't know of a modification to that attribute which can turn off > >this type of check. > > Perhaps you can split vprintk_store in the middle (after the call to > vsnprintf), and offer the second half as a function of its own (e.g. > "puts"). Then the tldr could be > > - printk(msg); > + puts(msg); That might be a nice compromise. Andrew, what do you think? -bw