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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EDE8C43334 for ; Fri, 10 Jun 2022 06:45:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BFE881FF4; Fri, 10 Jun 2022 08:44:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BFE881FF4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1654843501; bh=NUfNzI+Lzqk+ZMoLBcXdIunumPdQxiKPTgtDE7N0Sgk=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Z8IfBtDQqdGp5hUv+hxDzSo3neoqujxyRsTTPjIAjvwyaEY+fskGAx+4bad4H7cPN DzCqxNJJgZBiTGT5Tj6eXca5o3cb/J974ji8r5p7yfZXGhbJl6JKbjYJEQS2eeSXw7 5JRRxCCxer0q7tkyMvAlQgzmAPeM4ARg31o+sSDY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CA8F7F805D9; Fri, 10 Jun 2022 08:37:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0B981F800C7; Fri, 10 Jun 2022 03:19:28 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2E454F800E9 for ; Fri, 10 Jun 2022 03:19:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2E454F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="k2K3VAI6" 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 8753DB830E0; Fri, 10 Jun 2022 01:19:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 107EEC34114; Fri, 10 Jun 2022 01:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1654823959; bh=NUfNzI+Lzqk+ZMoLBcXdIunumPdQxiKPTgtDE7N0Sgk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=k2K3VAI6SDQeixfuxmPLxZgpiSqDGd0SM+Ll9mgkEIzO4uveLGhDNJt0+TSFK+7Dy zU2YexZB9zyyJafX9UAhTSLsmxBgnx4E4qwGlBqJCxclBsikRqriCf9H277tXNvHi5 35QHlBHe+SBvbWDdRMsPbHvFhnkfmzsajDvPN4sk= Date: Thu, 9 Jun 2022 18:19:17 -0700 From: Andrew Morton To: Bill Wendling Subject: Re: [PATCH 00/12] Clang -Wformat warning fixes Message-Id: <20220609181917.32e0169b3d33e42b8eb8dcac@linux-foundation.org> In-Reply-To: References: <20220609221702.347522-1-morbo@google.com> <20220609152527.4ad7862d4126e276e6f76315@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 10 Jun 2022 08:37:38 +0200 Cc: alsa-devel@alsa-project.org, "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , Nick Desaulniers , Dave Hansen , Phillip Potter , linux-mm@kvack.org, Eric Dumazet , Networking , "H. Peter Anvin" , Bill Wendling , Daniel Kiper , "Rafael J. Wysocki" , Jozsef Kadlecsik , ACPI Devel Maling List , Ingo Molnar , Tom Rix , Jakub Kicinski , Paolo Abeni , Pablo Neira Ayuso , clang-built-linux , coreteam@netfilter.org, Arnd Bergmann , Ross Philipson , Nathan Chancellor , Borislav Petkov , Thomas Gleixner , linux-edac@vger.kernel.org, Tony Luck , Greg Kroah-Hartman , Florian Westphal , Takashi Iwai , LKML , Jan Engelhardt , netfilter-devel@vger.kernel.org, Jan Kara , "David S. Miller" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, 9 Jun 2022 16:16:16 -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? > Sure. It's surprising that we don't already have a puts().