Re: [PATCH v3 3/4] x86/efi: print size in binary units in efi_print_memmap

From: James Bottomley
Date: Mon Jan 25 2016 - 10:25:42 EST


On Mon, 2016-01-25 at 10:31 +0200, Andy Shevchenko wrote:
> On Sat, 2016-01-23 at 10:03 -0800, James Bottomley wrote:
> > On Sat, 2016-01-23 at 19:18 +0200, Andy Shevchenko wrote:
> > > > If the goal is to have a clean interface reporting only the
> > > > first
> > > > four significant figures and a size exponent, then a helper
> > > > would
> > > > be much better than trying to open code this ad hoc.
> > >
> > > No. You get it wrong. The initial idea was (actually not mine,
> > > see
> > > authorship) to print an exact number with units and reduce
> > > whenever
> > > it's possible, i.e number is a multiplication of certain unit.
> >
> > so you must implement the original idea no matter how inconsistent
> > it
> > leads us to be? Is it wrong to try to do better?
>
> For both comments I prefer to hear Matt's opinion as he is maintainer
> of EFI stuff.
>
> My role in this all is to reduce the code base by avoiding 'not
> invented here' syndrome.

To get up to the starting blocks on that one, you need a usable
interface. Neither of the series has that for lib/string_helper.c, so
this is a NAK to both of those parts.

I already told you how to do it in a way that creates a maintainable
interface. It looks obvious to me and I was politely waiting for you
to produce it, but if you're saying your not able to, I suppose I can
produce the patch.

James