Re: [RFC] PTR_ERR: return 0 if ptr isn't an error value.

From: Rusty Russell
Date: Sat Jun 15 2013 - 23:14:57 EST

Julia Lawall <julia.lawall@xxxxxxx> 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_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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at