lkml.org 
[lkml]   [2013]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/5] lib: Add error string support to printks
From
Date
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 * __must_check ERR_PTR(long error)
{
return (void *) error;
}

> Either way, %pE does seem to make a lot of sense for conditions where we
> already have a pointer that we would otherwise use PTR_ERR() to convert,
> but it just seems klunky to use it on an int, to have it treated like a
> pointer and then re-interpreted as an int. Maybe we can add %pE as well
> as %dE and leave [ioxXu] out of it?

I think having just one way to format is better.




\
 
 \ /
  Last update: 2013-09-20 03:21    [W:0.112 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site