Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp959268iol; Thu, 9 Jun 2022 18:54:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ3QNY8+FVqHbMZUpBq63wbNerVDwtMSqQoU+VKRb9P9r3siEjDPq1lT5UzrWB5GngqwVh X-Received: by 2002:a63:1c5a:0:b0:3fd:1865:a789 with SMTP id c26-20020a631c5a000000b003fd1865a789mr32525890pgm.413.1654826054129; Thu, 09 Jun 2022 18:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654826054; cv=none; d=google.com; s=arc-20160816; b=0G6Ye966R+FHEXjdDODkwGXTkGHMTSDmkP70ELizgHbxCJ90M66f8Evx+wP6sq6CoT lODvBfVFZv/r+kC8TKfIM22jvj8CBRJsEdL9XOjDULrv7paeCBkm9dGblflZIrVX8SQN 8bv5eLpSbNo6uvxbuIPT2RHjhJXlZixIxCXzziKiC2p4u2Gv/xSpr0ytkaX7JKInfFOb fEIKlnNqWUIZPd2vmMFfC0DkM4lGLxq9iGwKqk1JS9N50IcWzz38FfvvmZZC8i0wb5Xu +9M3Oh0BzsH/TjDui+y8ac1s2KJIXZAE26w94fzCuV8jZC7kAiUpmxzuH6GNhxOvsd1Q DA8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=tr2XBxA4AopM6uJItb6SOeZO393dYRCTfA7nhtmk9ZY=; b=bYIUaRCrkdTnBv/OU/sAmN5UessJcRyFIMMLhMxTNgwqwNEcl7Y6FuMljvJ+13Q9vk yOFNyW5o6V+DdDydI9q7tQtMyL6ZxPxxwjV4ekCQ3sHqYzDh+XMqOFf3Mz6TaQ/RUxzl tg0dVw0H2q/gkc2gdchh6he5xsDK7fJ0N9rUZ7UCDXi0hQwKs785dwrtNRaQK8jy6wcL vct3eSyZM0FR/SY5EDMloo+fXAQtMGOxDI7jLBdzFYwFvLbgcjGraSrulTH2/xvqCuTv UGjNT0T1LL5zfE/B22IPSCbDRL/HqbKRU5aFqznPTb44mVK1GO6SreLkiCXkwuWordsL ZUOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=k2K3VAI6; 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 pg1-20020a17090b1e0100b001e3415b6b1dsi1314421pjb.103.2022.06.09.18.53.59; Thu, 09 Jun 2022 18:54:14 -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=@linux-foundation.org header.s=korg header.b=k2K3VAI6; 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 S239767AbiFJBTX (ORCPT + 99 others); Thu, 9 Jun 2022 21:19:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231573AbiFJBTV (ORCPT ); Thu, 9 Jun 2022 21:19:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B7C536E2B; Thu, 9 Jun 2022 18:19:20 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E1544616C9; Fri, 10 Jun 2022 01:19:19 +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 Cc: Jan Engelhardt , 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 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-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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, 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().