提交 fa79837d 编写于 作者: R Ralf Baechle 提交者: Linus Torvalds

[PATCH] Fix IS_ERR Threshold Value

 o Raise the maximum error number in IS_ERR_VALUE to 4095.
 o Make that number available as a new constant MAX_ERRNO.
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 10e5dce0
......@@ -13,7 +13,9 @@
* This should be a per-architecture thing, to allow different
* error and pointer decisions.
*/
#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
#define MAX_ERRNO 4095
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
static inline void *ERR_PTR(long error)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册