projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10e5dce
)
[PATCH] Fix IS_ERR Threshold Value
author
Ralf Baechle
<
[email protected]
>
Sat, 1 Jul 2006 11:36:25 +0000
(
04:36
-0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 1 Jul 2006 16:56:03 +0000
(09:56 -0700)
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 <
[email protected]
>
Cc: "H. Peter Anvin" <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
include/linux/err.h
patch
|
blob
|
history
diff --git
a/include/linux/err.h
b/include/linux/err.h
index ff71d2af5da33ac711da7f64957d8d93bad4f91f..cd3b367f7445e5aa0f25ddbf2f0b96c44a19b94f 100644
(file)
--- a/
include/linux/err.h
+++ b/
include/linux/err.h
@@
-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)
{