Re: [PATCH] remove lots of IS_ERR_VALUE abuses

Linus Torvalds
2016-05-27T21:56:31Z

On Fri, May 27, 2016 at 2:46 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> So you do plan to add some sort of typechecking into IS_ERR_VALUE()?

The easiest way to do it is to just turn the (x) into (unsigned
long)(void *)(x), which then complains about casting an integer to a
pointer if the integer has the wrong size.

But if we get rid of the bogus cases, there's just a few left, and we
should probably just rename the whole thing (the initial double
underscore). It really isn't something normal people should use.

Linus