[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220425055621.ffzp4lokgtsi72z2@moria.home.lan>
Date: Mon, 25 Apr 2022 01:56:21 -0400
From: Kent Overstreet <kent.overstreet@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Matthew Wilcox <willy@...radead.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org, hch@....de,
hannes@...xchg.org, akpm@...ux-foundation.org,
linux-clk@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-input@...r.kernel.org, roman.gushchin@...ux.dev
Subject: Re: [PATCH v2 1/8] lib/printbuf: New data structure for
heap-allocated strings
On Sun, Apr 24, 2022 at 10:00:32PM -0700, Joe Perches wrote:
> 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?
Touché :)
Powered by blists - more mailing lists