Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3723221rwb; Mon, 7 Aug 2023 19:45:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmgshiwlm0d2J+egc++7VbFhB7GaP0C+rr8AoQiBdecaR89kkAi+hS1o3gYJTAVRnsX4uQ X-Received: by 2002:aa7:de96:0:b0:522:5a05:6011 with SMTP id j22-20020aa7de96000000b005225a056011mr9570094edv.0.1691462753368; Mon, 07 Aug 2023 19:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691462753; cv=none; d=google.com; s=arc-20160816; b=gn9bhG/7Qd/EA01E5S6aiAtdjZfXYnhxWdvnb16/yS+LDPSfeQpXZRZSWGNpJgs7Uh HPgXgg1vAKnaUG34KpWSL3y1bZsPcySTJXkiB1qUBS8DpRW6T6TMEnSqbk30CfprpAI0 8+bX2yYxuSIWVrEzDnh1Bq1PtpvEkf98RRVirARu3LToZN3SbSHji4lOCzc3m+okjm0Y Yw0i4wQzVbBegJubsRqitx7IyngzQvIUa2/k5KuyaDTw3jY9AjokK7MPjboY5/2S0k7X aSFSg8pE3XeyLuhEpd9azreas7vuSvxmmGLo4QtR+BRDN0qtCtWwper2NiKiut5NpD6D 2qEQ== 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; bh=awT9Gp9MuVz7YTbyePoCqCMX94iobRJkvnRVF/baVBw=; fh=cZ3Mci7M45MF5sunQ2DsxgqLfMs4CwAHvXyT5W5PN1M=; b=Jhwrw3Q8/cQOrwS/nq1r+EP4kp7bI1o+hMJyluZy9UPpQWmgXe9wujC0CN2EbXROAy o3KCEax18PktIP9M9ld3Yn21fWXYbb/iq4KTqo1vMmV5hvpCICs4Q19xiW4DBAB4g6dN IDPe30X0hjRFXwUNvg8vQNYNomQwZBWbqftlkSNSYLmyDq7Pi6Nhqa67ei03YfUTBoA2 GomN+uqVKvkd3FLRZv4ObWvA6EVroFwDjtVnoTw+bDPCcqIQE86iCn5BA67/A28D7VPf mO4V9ei2WjxXdqspZY5v3BzEzUZFlCF1vR5llB+KySKuMs2X1ySD35VsXCxIbP8UNI8y ZLtA== 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 u11-20020a50eacb000000b0052279c57c79si6539049edp.341.2023.08.07.19.45.29; Mon, 07 Aug 2023 19:45:53 -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 S230130AbjHHCZG (ORCPT + 99 others); Mon, 7 Aug 2023 22:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbjHHCZE (ORCPT ); Mon, 7 Aug 2023 22:25:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AED3170B for ; Mon, 7 Aug 2023 19:25:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A8DED6237D for ; Tue, 8 Aug 2023 02:25:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09A04C433C7; Tue, 8 Aug 2023 02:24:58 +0000 (UTC) Date: Mon, 7 Aug 2023 22:24:55 -0400 From: Steven Rostedt To: Andy Shevchenko Cc: Petr Mladek , Marco Elver , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, Rasmus Villemoes , Sergey Senozhatsky , Alexander Potapenko , Dmitry Vyukov , Andrew Morton Subject: Re: [PATCH v2 2/3] lib/vsprintf: Split out sprintf() and friends Message-ID: <20230807222455.27874f80@gandalf.local.home> In-Reply-To: References: <20230805175027.50029-1-andriy.shevchenko@linux.intel.com> <20230805175027.50029-3-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 Mon, 7 Aug 2023 18:09:54 +0300 Andy Shevchenko wrote: > On Mon, Aug 07, 2023 at 05:03:19PM +0200, Petr Mladek wrote: > > On Sat 2023-08-05 20:50:26, Andy Shevchenko wrote: > > > kernel.h is being used as a dump for all kinds of stuff for a long time. > > > sprintf() and friends are used in many drivers without need of the full > > > kernel.h dependency train with it. > > > > > > Here is the attempt on cleaning it up by splitting out sprintf() and > > > friends. > > ... > > > I agree that kernel.h is not the right place. But are there any > > numbers how much separate sprintf.h might safe? > > Maybe, we should not reinvent the wheel and get inspired by > > userspace. > > > > sprintf() and friends are basic functions which most people know > > from userspace. And it is pretty handy that the kernel variants > > are are mostly compatible as well. > > > > IMHO, it might be handful when they are also included similar way > > as in userspace. From my POV printk.h is like stdio.h. And we already > > have include/linux/stdarg.h where the v*print*() function might > > fit nicely. > > > > How does this sound, please? > > Not every user (especially _header_) wants to have printk.h included just for > sprintf.h that may have nothing to do with real output. So, same reasoning > from me as keeping that in kernel.h, i.e. printk.h no better. > If you separate out the sprintf() into its own header and still include that in kernel.h, then for what you said in the other email: > What to do with _headers_ that include kernel.h for no reason other than > sprintf.h (as an example)? Your suggestion, please? It can include sprintf.h (or printk.h or stdio.h, whatever) instead of kernel.h. What's the issue? -- Steve