From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19F37C433EF for ; Thu, 9 Jun 2022 23:03:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 70C098D0061; Thu, 9 Jun 2022 19:03:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BB708D0034; Thu, 9 Jun 2022 19:03:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 583428D0061; Thu, 9 Jun 2022 19:03:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4A5E48D0034 for ; Thu, 9 Jun 2022 19:03:39 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 20E452119B for ; Thu, 9 Jun 2022 23:03:39 +0000 (UTC) X-FDA: 79560226158.23.9E122C0 Received: from a3.inai.de (a3.inai.de [88.198.85.195]) by imf07.hostedemail.com (Postfix) with ESMTP id 7797440045 for ; Thu, 9 Jun 2022 23:03:38 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654815818; a=rsa-sha256; cv=none; b=ENdDYaJb/0J/vaVNFntkWPu6tfDxr68VoX6oFpPk7qah4EZxgqV1+uUlE9SCC86s95ivPj qnHxV1mGPnh013WCRII22VNyYyQZANZPY149PI2FwBA3JJKoUodE3M/UGVjimmT8DZHDkh V6VZOQG7apI7lI3aepShmxrqfO9ufuo= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of jengelh@inai.de designates 88.198.85.195 as permitted sender) smtp.mailfrom=jengelh@inai.de; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654815818; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K6gPPGYa90UUF7Tocfw2nmF30itE2OsO5lQS6To4nSY=; b=zXKU8Qt4WMcqY3IlKpgPRnLnVyM8t/ghif1LsYSNfjTRwfUxhQwkrXEJTn7XQ/zd1DPEfc 7wS2MK66T5h58hvML2ccCt/7PEQE5qkLgJHirFvycR1UyIzk8g8MOnnr0p4rJ/2cuNLRNU HFGw7vPOq4ZZr2PvZKfefIJenkh9hbU= X-Rspamd-Queue-Id: 7797440045 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=none; spf=pass (imf07.hostedemail.com: domain of jengelh@inai.de designates 88.198.85.195 as permitted sender) smtp.mailfrom=jengelh@inai.de; dmarc=none X-Stat-Signature: tnsmp4t7wt64mspio5dku6g7xt9g34fa X-Rspamd-Server: rspam02 X-HE-Tag: 1654815818-391404 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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);