mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
[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>
This commit is contained in:
parent
bd8e39f9e4
commit
ebba5f9fcb
14 changed files with 43 additions and 23 deletions
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
#define MAX_ERRNO 4095
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
|
||||
|
||||
static inline void *ERR_PTR(long error)
|
||||
|
@ -32,4 +34,6 @@ static inline long IS_ERR(const void *ptr)
|
|||
return IS_ERR_VALUE((unsigned long)ptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_ERR_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue