Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp874348iol; Thu, 9 Jun 2022 16:24:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDotGQVORaaD74IEb5RBylfYKlqqrybjAJ+NDWMrpTCGzmOlTvgXXTf0KZBJshT/WSohNI X-Received: by 2002:a63:fa56:0:b0:3fc:d3d2:ceac with SMTP id g22-20020a63fa56000000b003fcd3d2ceacmr36820259pgk.99.1654817066070; Thu, 09 Jun 2022 16:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654817066; cv=none; d=google.com; s=arc-20160816; b=nQ1jAA4C6k3VI6eIjeWXY+y26AdV+LpuQ1UWkaBf8PRpllhct1NmQ3bNIi43qDHgOb M4pifnvgwyE97Ros++wd1zy+2XVKbXrz1JivuxnaynRK6mBKt4NEbYfXLCZAR4LpoJRP g45wc05WFhepryradHBULC5AoKw/1fLO8T+h0d9Due/jnaMUY5cDy6Xl1SsyYXpF7qYL pe+e15760KExajAoDKcbYiW0JQbPfCNjPdMZy6xkwZYsskF+xRoqiaOVBn6k9S++oYR0 Sk7JIwQv4tMUW+cAOoSU7jW5r84rjd8EN/zgJtpioilZEM6CRnJnSNE0WVJ/nsFIwa97 7Ypw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=K6gPPGYa90UUF7Tocfw2nmF30itE2OsO5lQS6To4nSY=; b=GAhvUKwT+Nhi5dkJFeV5cdabOdHSTjTG5Bt/iCiQN1OcplAOmlRT/K5M9nRwvZwEQ+ 46GMhaJYWMV99611jixasjwBD3qp/Zgmp0QsXFrN/HCWdT5RtpghU650qXVpJ6CossyK M7Rjgg+8+OODFe2iMwAQTih7Zexn1lxUz2ToaPGnnDzIcwtusxK8Te76KQ0brezwzdfQ 86l7syrI5jCN6+ksWH/sdwZKyzOiQByoAxSkAisEj7SLPP8xYV3dpOR6Lb4kcL/Q8TXZ 5X97JE6uLDURl7an5EIY1Yg45Fs7WApFhyUNPWOm1jdrhPzxmUywF7G3eaTGE19Kp/a2 xxbg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a170902904200b0016228c736afsi30729721plz.511.2022.06.09.16.24.14; Thu, 09 Jun 2022 16:24:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345847AbiFIXD4 (ORCPT + 99 others); Thu, 9 Jun 2022 19:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234341AbiFIXDl (ORCPT ); Thu, 9 Jun 2022 19:03:41 -0400 Received: from a3.inai.de (a3.inai.de [IPv6:2a01:4f8:10b:45d8::f5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B069C3A8A4B; Thu, 9 Jun 2022 16:03:37 -0700 (PDT) Received: by a3.inai.de (Postfix, from userid 25121) id 3364758723354; Fri, 10 Jun 2022 01:03:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by a3.inai.de (Postfix) with ESMTP id 30D9E60C247C4; Fri, 10 Jun 2022 01:03:36 +0200 (CEST) Date: Fri, 10 Jun 2022 01:03:36 +0200 (CEST) From: Jan Engelhardt To: Bill Wendling 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 Subject: Re: [PATCH 00/12] Clang -Wformat warning fixes In-Reply-To: Message-ID: References: <20220609221702.347522-1-morbo@google.com> <20220609152527.4ad7862d4126e276e6f76315@linux-foundation.org> User-Agent: Alpine 2.25 (LSU 592 2021-09-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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);