Using ERR_PTR/PTR_ERR/IS_ERR is probably the correct thing to do, but
that codebase predates the "error pointer" macros by about 9 years ;)
> btw, is err should (according to alans explaination be):
>
> return (unsigned long)ptr > (unsigned long)-1024UL;
The 1000 vs 1024 thing is just another "random number". I don't know what
the right number is myself, it may be worth trying to pick one that is
uniformly easy to test against, for example. Many architectures are better
at some constants than others.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/