Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314536 > unrolled thread

Re: [PATCH v2 06/11] lib/vsprintf: introduce %pl to print in human-readable form

Started by"H. Peter Anvin" <hpa@zytor.com>
First post2016-01-21 22:20 +0100
Last post2016-01-21 22:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 06/11] lib/vsprintf: introduce %pl to print in  human-readable form "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 22:20 +0100

#1314536 — Re: [PATCH v2 06/11] lib/vsprintf: introduce %pl to print in human-readable form

From"H. Peter Anvin" <hpa@zytor.com>
Date2016-01-21 22:20 +0100
SubjectRe: [PATCH v2 06/11] lib/vsprintf: introduce %pl to print in human-readable form
Message-ID<qTuO7-2vq-23@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web