aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2006-09-27 04:50:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:18 -0400
commitebba5f9fcb882306bef7175dee987342ec6fcf2f (patch)
treea947175a24a3261ab3ffb5d9244e40939dd5495d /include/asm-frv
parentbd8e39f9e4c0960541c8c69e1f7cb321574d7c90 (diff)
[PATCH] consistently use MAX_ERRNO in __syscall_return
Consistently use MAX_ERRNO when checking for errors in __syscall_return(). [ralf@linux-mips.org: build fix] Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-frv')
-rw-r--r--include/asm-frv/unistd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h
index b80dbd839475..d104d1b91d39 100644
--- a/include/asm-frv/unistd.h
+++ b/include/asm-frv/unistd.h
@@ -320,6 +320,7 @@
320#ifdef __KERNEL__ 320#ifdef __KERNEL__
321 321
322#define NR_syscalls 310 322#define NR_syscalls 310
323#include <linux/err.h>
323 324
324/* 325/*
325 * process the return value of a syscall, consigning it to one of two possible fates 326 * process the return value of a syscall, consigning it to one of two possible fates
@@ -329,7 +330,7 @@
329#define __syscall_return(type, res) \ 330#define __syscall_return(type, res) \
330do { \ 331do { \
331 unsigned long __sr2 = (res); \ 332 unsigned long __sr2 = (res); \
332 if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) { \ 333 if (__builtin_expect(__sr2 >= (unsigned long)(-MAX_ERRNO), 0)) { \
333 errno = (-__sr2); \ 334 errno = (-__sr2); \
334 __sr2 = ~0UL; \ 335 __sr2 = ~0UL; \
335 } \ 336 } \