Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-29 Thread Andy Shevchenko
On Tue, 2015-12-29 at 00:20 +0200, Andy Shevchenko wrote: > On Mon, Dec 28, 2015 at 11:42 PM, Rasmus Villemoes > wrote: > > On Mon, Dec 28 2015, Joe Perches wrote: > > > > > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: > > > > xnumber() is a special helper to print a fixed size

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-29 Thread Andy Shevchenko
On Tue, 2015-12-29 at 00:20 +0200, Andy Shevchenko wrote: > On Mon, Dec 28, 2015 at 11:42 PM, Rasmus Villemoes > wrote: > > On Mon, Dec 28 2015, Joe Perches wrote: > > > > > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: > > > > xnumber()

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Joe Perches
On Mon, 2015-12-28 at 21:02 +0200, Andy Shevchenko wrote: > On Mon, Dec 28, 2015 at 8:25 PM, Joe Perches wrote: > > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: > > > xnumber() is a special helper to print a fixed size type in a hex format > > > with > > > '0x' prefix with padding

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Rasmus Villemoes
On Mon, Dec 28 2015, Andy Shevchenko wrote: > On Mon, Dec 28, 2015 at 11:42 PM, Rasmus Villemoes > wrote: >> On Mon, Dec 28 2015, Joe Perches wrote: >> >>> On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: xnumber() is a special helper to print a fixed size type in a hex format

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
On Tue, Dec 29, 2015 at 12:20 AM, Rasmus Villemoes wrote: > On Mon, Dec 28 2015, Rasmus Villemoes wrote: > >> >> Is there any aspect of the passed-through printf_spec which isn't >> overridden in xnumber? The users are/will be various %p extensions, >> which probably means that no-one passes a

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Rasmus Villemoes
On Mon, Dec 28 2015, Rasmus Villemoes wrote: > > Is there any aspect of the passed-through printf_spec which isn't > overridden in xnumber? The users are/will be various %p extensions, > which probably means that no-one passes a non-default precision (gcc > complains about %.*p), and the

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
On Mon, Dec 28, 2015 at 11:42 PM, Rasmus Villemoes wrote: > On Mon, Dec 28 2015, Joe Perches wrote: > >> On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: >>> xnumber() is a special helper to print a fixed size type in a hex format >>> with >>> '0x' prefix with padding and reduced size.

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Rasmus Villemoes
On Mon, Dec 28 2015, Joe Perches wrote: > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: >> xnumber() is a special helper to print a fixed size type in a hex format with >> '0x' prefix with padding and reduced size. In the module we have already >> several copies of such code.

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
On Mon, Dec 28, 2015 at 8:25 PM, Joe Perches wrote: > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: >> xnumber() is a special helper to print a fixed size type in a hex format with >> '0x' prefix with padding and reduced size. In the module we have already >> several copies of such

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Joe Perches
On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: > xnumber() is a special helper to print a fixed size type in a hex format with > '0x' prefix with padding and reduced size. In the module we have already > several copies of such code. Consolidate them under xnumber() helper. > > There

[PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
xnumber() is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them under xnumber() helper. There are couple of differences though. It seems nobody cared about the

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
On Tue, Dec 29, 2015 at 12:20 AM, Rasmus Villemoes wrote: > On Mon, Dec 28 2015, Rasmus Villemoes wrote: > >> >> Is there any aspect of the passed-through printf_spec which isn't >> overridden in xnumber? The users are/will be various %p

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
On Mon, Dec 28, 2015 at 11:42 PM, Rasmus Villemoes wrote: > On Mon, Dec 28 2015, Joe Perches wrote: > >> On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: >>> xnumber() is a special helper to print a fixed size type in a hex format >>> with

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Rasmus Villemoes
On Mon, Dec 28 2015, Rasmus Villemoes wrote: > > Is there any aspect of the passed-through printf_spec which isn't > overridden in xnumber? The users are/will be various %p extensions, > which probably means that no-one passes a non-default precision (gcc > complains

[PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
xnumber() is a special helper to print a fixed size type in a hex format with '0x' prefix with padding and reduced size. In the module we have already several copies of such code. Consolidate them under xnumber() helper. There are couple of differences though. It seems nobody cared about the

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Rasmus Villemoes
On Mon, Dec 28 2015, Joe Perches wrote: > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: >> xnumber() is a special helper to print a fixed size type in a hex format with >> '0x' prefix with padding and reduced size. In the module we have already >> several copies of

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Rasmus Villemoes
On Mon, Dec 28 2015, Andy Shevchenko wrote: > On Mon, Dec 28, 2015 at 11:42 PM, Rasmus Villemoes > wrote: >> On Mon, Dec 28 2015, Joe Perches wrote: >> >>> On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote:

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Andy Shevchenko
On Mon, Dec 28, 2015 at 8:25 PM, Joe Perches wrote: > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: >> xnumber() is a special helper to print a fixed size type in a hex format with >> '0x' prefix with padding and reduced size. In the module we have already >> several

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Joe Perches
On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: > xnumber() is a special helper to print a fixed size type in a hex format with > '0x' prefix with padding and reduced size. In the module we have already > several copies of such code. Consolidate them under xnumber() helper. > > There

Re: [PATCH v1 1/1] lib/vsprintf: refactor duplicate code to xnumber()

2015-12-28 Thread Joe Perches
On Mon, 2015-12-28 at 21:02 +0200, Andy Shevchenko wrote: > On Mon, Dec 28, 2015 at 8:25 PM, Joe Perches wrote: > > On Mon, 2015-12-28 at 20:18 +0200, Andy Shevchenko wrote: > > > xnumber() is a special helper to print a fixed size type in a hex format > > > with > > > '0x'