[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56A14A03.3090403@zytor.com>
Date: Thu, 21 Jan 2016 13:13:39 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Robert Elliott <elliott@....com>,
Matt Fleming <matt@...eblueprint.co.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Brian Norris <computersforpeace@...il.com>,
Hariprasad S <hariprasad@...lsio.com>
Subject: Re: [PATCH v2 06/11] lib/vsprintf: introduce %pl to print in
human-readable form
On 01/14/16 14:23, Andy Shevchenko wrote:
> Introduce a new extension for printing given unsigned long long value in
> human-readable form with automatically choosen IEC binary prefix. The value is
> passed by reference.
Why by reference? That seems to make little sense.
The prefix should not include the unit (e.g. B) as we may want to use
another thing.
It is also worth noting that what you have here is to generate *exact*
values, which aren't always what we want. Another common thing is to
round/truncate to 3 significant figures in order to get the order of
magnitude clear; the prefix being so different depending on the low
order bits can be confusing when an exact representation isn't needed.
-hpa
Powered by blists - more mailing lists