Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [RFC] PTR_ERR: return 0 if ptr isn't an error value. | Date | Sun, 16 Jun 2013 12:14:11 +0930 |
| |
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.
| |