Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-23 Thread Daniel Santos
On 09/20/2013 08:07 AM, David Howells wrote: I suspect he doesn't really need to implement a "strerror()" function but should rather build it straight into printk()/vsprintf(). David Indeed we don't necessarily *need* a strerror() function per-se, but it is an addition to the libc support in

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-23 Thread Daniel Santos
On 09/20/2013 06:45 AM, Joe Perches wrote: On Fri, 2013-09-20 at 00:21 -0500, Daniel Santos wrote: [nice example about bloat] Yeah, I do agree, I just don't see how to do it without introducing unnecessary bloat. I think the code size cost of %pE is pretty trivial compared to the log size/run

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-20 Thread David Howells
Joe Perches wrote: > > Yeah, I do agree, I just don't see how to do it without introducing > > unnecessary bloat. > > I think the code size cost of %pE is pretty trivial > compared to the log size/runtime cost. > > I would not want to see it used generically. I suspect he doesn't really need

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-20 Thread Joe Perches
On Fri, 2013-09-20 at 00:21 -0500, Daniel Santos wrote: [nice example about bloat] > Yeah, I do agree, I just don't see how to do it without introducing > unnecessary bloat. I think the code size cost of %pE is pretty trivial compared to the log size/runtime cost. I would not want to see it us

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-19 Thread Daniel Santos
On 09/19/2013 08:07 PM, Joe Perches wrote: On Wed, 2013-09-18 at 20:27 -0500, Daniel Santos wrote: if I use ERR_PTR() on a signed int on a x86_64 where pointer is 64 bits and int is 32, wouldn't that mean a signed conversion instruction where the sign bit has to be moved from bit 31 to 63? No.

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-19 Thread Joe Perches
On Wed, 2013-09-18 at 20:27 -0500, Daniel Santos wrote: > if I use ERR_PTR() on a signed int on a x86_64 where pointer > is 64 bits and int is 32, wouldn't that mean a signed conversion > instruction where the sign bit has to be moved from bit 31 to 63? No. It's cast to long static inline void

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:04 AM, David Howells wrote: Joe Perches wrote: On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: This adds an extension for the integral format specifier suffix of 'e', so that the format %[duxXo]e will result in printing an number (as before) in addition to a

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-18 Thread David Howells
Joe Perches wrote: > On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: > > This adds an extension for the integral format specifier suffix of 'e', > > so that the format %[duxXo]e will result in printing an number (as > > before) in addition to a name and descrption for an error cod

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-17 Thread Joe Perches
On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: > This adds an extension for the integral format specifier suffix of 'e', > so that the format %[duxXo]e will result in printing an number (as > before) in addition to a name and descrption for an error code, if such > support is enabl

[PATCH 5/5] lib: Add error string support to printks

2013-09-17 Thread danielfsantos
This adds an extension for the integral format specifier suffix of 'e', so that the format %[duxXo]e will result in printing an number (as before) in addition to a name and descrption for an error code, if such support is enabled and a name and descrption is found. My initial thought was to use th