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 1C86BEB64DD for ; Tue, 8 Aug 2023 02:25:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B1DE76B0071; Mon, 7 Aug 2023 22:25:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA76B6B0074; Mon, 7 Aug 2023 22:25:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 948098D0001; Mon, 7 Aug 2023 22:25:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 821836B0071 for ; Mon, 7 Aug 2023 22:25:03 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5B8B6401C2 for ; Tue, 8 Aug 2023 02:25:03 +0000 (UTC) X-FDA: 81099344886.22.7516812 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id AD5B91A0003 for ; Tue, 8 Aug 2023 02:25:01 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of "SRS0=MmwB=DZ=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=MmwB=DZ=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691461501; a=rsa-sha256; cv=none; b=BdmSHc6U7qMEz7xOacjq+7Ktur34kKcjkhNeuF+99ZKmbYjn4a1RKE6gQJiA5GVi4/y+Ds oTuQF3HNuulANMLwRJvKnTQzsEVtf7R0wFmm65fBqvPhZMI0z5fiQcaRTB4sQdEqsGZ0if O2wqRF/PhYzYi1nw2BN1yWAFTDJ+xhw= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf19.hostedemail.com: domain of "SRS0=MmwB=DZ=goodmis.org=rostedt@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=MmwB=DZ=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691461501; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=awT9Gp9MuVz7YTbyePoCqCMX94iobRJkvnRVF/baVBw=; b=p0bYM8LUWYf0r/iGZTmtYsVFBy2SCqZWgG4SiUeUroqd9+vlPGzT5jeQsRGds+Dkci+erW 7djAqKGsxmZ2+Agaw/o2vzLUD7Ac+T69w1qzxJMgvvKrWk7NnI0MIIysSKKZta7ycyN+d/ 8wNF3FYDQNluCK/gNgtWkmuYc/o6x1A= 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 AC3BF62381; 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-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: AD5B91A0003 X-Stat-Signature: bbek3gpmykbzwqaumonq36epa8ghykot X-Rspam-User: X-HE-Tag: 1691461501-621658 X-HE-Meta: U2FsdGVkX186tfH21Lebg+WhvVj8r1LvxSFOPLC2ZhhRu+h8xgGWkWVQrn8o7hVrLiXnVsHlDePJK0HEMixLLYnk5Qch1vg30uR7dHx2Ytxh8eDVJ5sQhPrJzAuLFUjLy/zSXI9XKQMBmT6hgqYFDuc1FUG19pjBRxV3rsi3lTbQIpqxtAqteTawxMBeMPSN4+KSAiv3YwrP0a7sRTOuScNlJdxAsHGBdtVXLiT/UukAWUu4Wtas7viaJGqWlO2ngeLJrAjgjrNuNsFVC6+sIGME1aAlsrsgzi6WCUqhDfA3xwTQ4EYuTjXn3HGfqDG4Tlhj3+seZCS6S8dQ0PM/o/noQ2LN8nVu1lmFtB/mkU7b4DQ9k58IbOWWg6x5Fh3Vi7TosoBXHUUO3KukAHz4FutbynNx17cYYsu1Qu95yKx+NQcOlRJP5yanUqJ0hBqyMpIOzeIZpIZT20lsYPk+LCf+Uj/BUwq2GbeRzouYUpybMl0DF5u/VjTlkmGMYtzAT/AhG6oDGGOrXYOSNjif2y5CR8Ul3fjd23JHwTvQwTkr6kbAqanO08wWEY32rsUVO5XWY7x2kUBDHyPq7m4hRpmmKca9Up6nCCVI6GM1EcAEhBORilbUqHCvhR4oB8ESazF270cPilkoMPXdIkBytV99ktie9KWIG0c0Oy9XsAk/U6/2R/LYwMmkWaQlg0blj1oG8hi292+nvNBV21PBPxTJivstuVFnhvMVr0CZ7oyyNYVYw12OhV9C2THcGi30cba2DFv/D01cPdVR1Pmbx6QcwpCZ6O4Uf9KnZVX325qBzaohj6juAH8MbngWM3JTOEAnFYRiuIwA9ykPu6sQLGpvIDgD1r677raUAHMsGY3xIWZM0CzuPsSx9XmnAsK/FexcPildMVa+JUzgMs6H8L5VQOrnzaJ6PSXBnzKj+o+Lbra5w3VTgnAlkh9u/UeYEzf+T+l3aMcoDtUDj5L jVNqXU8Z jZIefL9PnBhE40LfRehSRLk77eDeB9tVnkhg73UbMU62JGK+WXfHAnICzVfgh4H9sozAQKaj8AV4pI4MwX15IpTHYLrWOR/Fw88rzk/lSY7mrY7QoNPzPY5KsmjXfi7kAp2pNNAszYEJbS0Oj87Ir7TriaprU/FpJ8UZ6CYJG0IGeqzRtVSyxD6CUjllzbPv8GAEFH/1R1ko7SkXIheOD2o7l/pty+dvNE1WgHWh7ukcS3qYwxHqsxE1WBuZ2MajHA1pNFEEFHtu4kd3v8S9wK8AMVgM9zK7I+D6eJ8rB/2ZaX2fUqocD0615Je4F9Q6xnJjTrSAGuHeodNtJSmbwuvmDry+2rmFv+NuH0Cqmwv/zaX3u2U5OCpYRmg== 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 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