diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-07-01 07:36:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:56:03 -0400 |
commit | fa79837d5b562766a3e3cfad4753a3df8e0a1319 (patch) | |
tree | 5cbc2a4de92acce3e0ad47e6481c4524c810b33a /include/linux/err.h | |
parent | 10e5dce07e6f8f9cea1b54161a888bb099484f88 (diff) |
[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: Ralf Baechle <ralf@linux-mips.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/err.h')
-rw-r--r-- | include/linux/err.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/err.h b/include/linux/err.h index ff71d2af5da3..cd3b367f7445 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -13,7 +13,9 @@ | |||
13 | * This should be a per-architecture thing, to allow different | 13 | * This should be a per-architecture thing, to allow different |
14 | * error and pointer decisions. | 14 | * error and pointer decisions. |
15 | */ | 15 | */ |
16 | #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) | 16 | #define MAX_ERRNO 4095 |
17 | |||
18 | #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) | ||
17 | 19 | ||
18 | static inline void *ERR_PTR(long error) | 20 | static inline void *ERR_PTR(long error) |
19 | { | 21 | { |