Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1073593iol; Thu, 9 Jun 2022 22:51:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp9ipX6i13EBj2SdGGGJCHlhs/4ixbzVmBUwY4g4T7hTiQ2lnbjvXfATYPP0nqrEY/KoYV X-Received: by 2002:a17:906:8302:b0:70d:7465:495a with SMTP id j2-20020a170906830200b0070d7465495amr34818185ejx.115.1654840273941; Thu, 09 Jun 2022 22:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654840273; cv=none; d=google.com; s=arc-20160816; b=SQPKTIe2I385WraIyliuVLt/SWRshtQuCACrAdJgj87540ZMbnWZ7V8Giok+p0ntL3 v7zsqNW64OBtYpX2mPX66mtWSQymNcLyKD2LT8D+Gl60lpB6u76gILQyLWO7zWSUdOp0 F2z0ca8WQRtMGB1XW/OyhfHcuf3cTtZI7D+8hH6oeI2+RW9j39oQFTxqOfUaB0n2GoBT VT/WyDNqw3UkPLDUttuHtk7vTli/NmomexMEgl/kMfCLZIprbF5s4+92mc3uvjJSitoR ysQ7nZQWTLPGfZdXLmlgLWxzv4I+tWpUUU0cZXb6AWjMnHorCgr+hzGLjUG7Uqj0hF8W h9Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PQMgMqJlq0ttvv1vVXFYqldL1BxHmyxwX97Rwiy4wVk=; b=jsUfttqpzGM8XPIEUIXXSOY3nLsc1kLTJuqZE1KrE5J9XQ577GA34IgqzkRQeS1Q4Z 5GHMQ59xzSdMVxHmRSMjQ33FFiCS+gKSPG2OQ9tesdRxPZmaHNPt6ILfZ6pluUThPw0d xbIKJDYxAJ1iGGQdpz/Qw5Wn/qxNaImAyD1nEvQ7gf3sDOOCtxIa/JcHbF6vSu7bqIH8 f3ncmDkc5hk/Bq8x3p+shX5GLLefF0J0eaLzznGxLqOaJPo8CCXQF3y5LDsED93sHDcp jh+qaiT8jkRCzKEGYMMMmVjNWkMQ4P+eh8clQRpsgw8C65jHTLpkRsAyQ6pU7930mA9R 0Hig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="k/PjXRW3"; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a1709063aca00b006e832929deesi23713491ejd.421.2022.06.09.22.50.48; Thu, 09 Jun 2022 22:51:13 -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=@linuxfoundation.org header.s=korg header.b="k/PjXRW3"; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346105AbiFJFUn (ORCPT + 99 others); Fri, 10 Jun 2022 01:20:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346132AbiFJFUk (ORCPT ); Fri, 10 Jun 2022 01:20:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A643B3C2; Thu, 9 Jun 2022 22:20:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 43230B830F6; Fri, 10 Jun 2022 05:20:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6278AC34114; Fri, 10 Jun 2022 05:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654838433; bh=obJOg0nC5+NFcMbSl//FLvr+ceUwgMoc50Ko3u2Lf80=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k/PjXRW3Ejm3OWA0ILi7O80zfEKst1OpP7BC0SxRltN5BaZsp6jjKtr3wXBUDO5zB e4Raz/E5WEJs1UM/fE5IzTFZTwR5xBef7mdwfpGnTFs6jcYygdrsalBjswLqjAwcn8 xxzJxOn25O10o5RwvKHTCaY9QGZ0KZC/wv3VRoMA= Date: Fri, 10 Jun 2022 07:20:31 +0200 From: Greg Kroah-Hartman To: Bill Wendling Cc: Jan Engelhardt , 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 , "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 Message-ID: References: <20220609221702.347522-1-morbo@google.com> <20220609152527.4ad7862d4126e276e6f76315@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 09, 2022 at 04:16:16PM -0700, Bill Wendling wrote: > 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? You would need to do that for all of the dev_printk() variants, so I doubt that would ever be all that useful as almost no one should be using a "raw" printk() these days. thanks, greg k-h