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 DE6A2C433F5 for ; Mon, 25 Apr 2022 05:00:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A2658D0005; Mon, 25 Apr 2022 01:00:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 751F38D0001; Mon, 25 Apr 2022 01:00:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61A8F8D0005; Mon, 25 Apr 2022 01:00:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 4F4048D0001 for ; Mon, 25 Apr 2022 01:00:42 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 22DF28207A for ; Mon, 25 Apr 2022 05:00:42 +0000 (UTC) X-FDA: 79394201124.04.FD34155 Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by imf30.hostedemail.com (Postfix) with ESMTP id 1E50A80042 for ; Mon, 25 Apr 2022 05:00:35 +0000 (UTC) Received: from omf06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3C093277D2; Mon, 25 Apr 2022 05:00:40 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA id 0B03120014; Mon, 25 Apr 2022 05:00:32 +0000 (UTC) Message-ID: <2df59c0f4763b81741b12894434ceeaee35c85a2.camel@perches.com> Subject: Re: [PATCH v2 1/8] lib/printbuf: New data structure for heap-allocated strings From: Joe Perches To: Kent Overstreet Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, hch@lst.de, hannes@cmpxchg.org, akpm@linux-foundation.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-input@vger.kernel.org, roman.gushchin@linux.dev Date: Sun, 24 Apr 2022 22:00:32 -0700 In-Reply-To: <20220425045909.rhot6b4xrd4tv6h6@moria.home.lan> References: <20220421234837.3629927-1-kent.overstreet@gmail.com> <20220421234837.3629927-7-kent.overstreet@gmail.com> <20220425041909.hcyirjphrkhxz6hx@moria.home.lan> <9ab6601364a16c782ca36ab22a2c67face0785a7.camel@perches.com> <20220425045909.rhot6b4xrd4tv6h6@moria.home.lan> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18hNDXlNHKfjpibaYFaIWfcPRYHykl/vRI= X-HE-Tag-Orig: 1650862832-222614 Authentication-Results: imf30.hostedemail.com; dkim=none; spf=none (imf30.hostedemail.com: domain of joe@perches.com has no SPF policy when checking 64.99.140.28) smtp.mailfrom=joe@perches.com; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1E50A80042 X-Stat-Signature: g1cbsu8ytj5gh9depeqi3no9ec4f59yo X-HE-Tag: 1650862835-858752 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, 2022-04-25 at 00:59 -0400, Kent Overstreet wrote: > On Sun, Apr 24, 2022 at 09:48:58PM -0700, Joe Perches wrote: > > On Mon, 2022-04-25 at 00:19 -0400, Kent Overstreet wrote: > > > On Mon, Apr 25, 2022 at 03:44:34AM +0100, Matthew Wilcox wrote: > > > > On Sun, Apr 24, 2022 at 04:46:03PM -0700, Joe Perches wrote: > > > > > > + * pr_human_readable_u64, pr_human_readable_s64: Print an integer with human > > > > > > + * readable units. > > > > > > > > > > Why not extend vsprintf for this using something like %pH[8|16|32|64] > > > > > or %pH[c|s|l|ll|uc|us|ul|ull] ? > > > > > > > > The %pX extension we have is _cute_, but ultimately a bad idea. It > > > > centralises all kinds of unrelated things in vsprintf.c, eg bdev_name() > > > > and clock() and ip_addr_string(). > > > > > > And it's not remotely discoverable. I didn't realize we had bdev_name() > > > available as a format string until just now or I would've been using it! > > > > Documentation/core-api/printk-formats.rst > > Who has time for docs? The same people that have time to reimplement the already implemented?