lkml.org 
[lkml]   [2013]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] PTR_ERR: return 0 if ptr isn't an error value.
Date
Julia Lawall <julia.lawall@lip6.fr> writes:
> On Thu, 13 Jun 2013, Michael S. Tsirkin wrote:
>
>> On Thu, Jun 13, 2013 at 02:07:40PM +0930, Rusty Russell wrote:
>> > I think using PTR_ERR() is a less bad solution than promoting PTR_RET,
>> > which has a non-obvious name.
>>
>> Will a longer name make the function more obvious?
>> PTR_ERR_OR_ZERO() ?
>> PTR_ERR0() ?
>> PTR_ERR() can then stay simple for cases where we know we
>> are on the error path.
>
> I was thinking of something along those lines. And in that case, PTR_ERR
> could stay without the additional test.
> julia

OK, sold :)

Will send out a series now with PTR_ERR_OR_ZERO.

Thanks,
Rusty.


\
 
 \ /
  Last update: 2013-06-16 06:01    [W:0.281 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site