diff options
author | Andrew Morton <akpm@osdl.org> | 2004-08-22 23:04:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 23:04:49 -0700 |
commit | 3b0b17a8cf0d6c737c79a041626b0528f637b65b (patch) | |
tree | f156bf23c73d53d10931a1d6c928020bc56ddfff /include | |
parent | 17ccf8a628cd407c68f2df675bd3c363d1d9ca78 (diff) | |
download | history-3b0b17a8cf0d6c737c79a041626b0528f637b65b.tar.gz |
[PATCH] mark IS_ERR as unlikely()
It seems fair to assume that it is always unlikely that IS_ERR will return
true.
This patch changes the gcc-3.4-generated kernel text by ~500 bytes (less) so
it's fair to assume that the compiler is indeed propagating unlikeliness out
of inline functions.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-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 92cab64fdd837f..17c55df13615a9 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -1,6 +1,8 @@ #ifndef _LINUX_ERR_H #define _LINUX_ERR_H +#include <linux/compiler.h> + #include <asm/errno.h> /* @@ -23,7 +25,7 @@ static inline long PTR_ERR(const void *ptr) static inline long IS_ERR(const void *ptr) { - return (unsigned long)ptr > (unsigned long)-1000L; + return unlikely((unsigned long)ptr > (unsigned long)-1000L); } #endif /* _LINUX_ERR_H */ |