- consistently-use-max_errno-in-__syscall_return.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     consistently use MAX_ERRNO in __syscall_return

has been removed from the -mm tree.  Its filename is

     consistently-use-max_errno-in-__syscall_return.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: consistently use MAX_ERRNO in __syscall_return
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

Consistently use MAX_ERRNO when checking for errors in __syscall_return().

[ralf@xxxxxxxxxxxxxx: build fix]
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/asm-arm/unistd.h       |    3 ++-
 include/asm-arm26/unistd.h     |    3 ++-
 include/asm-frv/unistd.h       |    3 ++-
 include/asm-h8300/unistd.h     |    6 +++---
 include/asm-i386/unistd.h      |    5 +++--
 include/asm-m32r/unistd.h      |    5 +++--
 include/asm-m68k/unistd.h      |    5 +++--
 include/asm-m68knommu/unistd.h |    5 +++--
 include/asm-s390/unistd.h      |    4 +++-
 include/asm-sh/unistd.h        |    7 +++++--
 include/asm-sh64/unistd.h      |    6 ++++--
 include/asm-v850/unistd.h      |    5 +++--
 include/asm-x86_64/unistd.h    |    5 +++--
 include/linux/err.h            |    4 ++++
 14 files changed, 43 insertions(+), 23 deletions(-)

diff -puN include/asm-arm/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-arm/unistd.h
--- a/include/asm-arm/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-arm/unistd.h
@@ -377,6 +377,7 @@
 #endif
 
 #ifdef __KERNEL__
+#include <linux/err.h>
 #include <linux/linkage.h>
 
 #define __sys2(x) #x
@@ -396,7 +397,7 @@
 
 #define __syscall_return(type, res)					\
 do {									\
-	if ((unsigned long)(res) >= (unsigned long)(-129)) {		\
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) {	\
 		errno = -(res);						\
 		res = -1;						\
 	}								\
diff -puN include/asm-arm26/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-arm26/unistd.h
--- a/include/asm-arm26/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-arm26/unistd.h
@@ -311,6 +311,7 @@
 #define __ARM_NR_usr26			(__ARM_NR_BASE+3)
 
 #ifdef __KERNEL__
+#include <linux/err.h>
 #include <linux/linkage.h>
 
 #define __sys2(x) #x
@@ -322,7 +323,7 @@
 
 #define __syscall_return(type, res)					\
 do {									\
-	if ((unsigned long)(res) >= (unsigned long)(-125)) {		\
+	if ((unsigned long)(res) >= (unsigned long)-MAX_ERRNO) {	\
 		errno = -(res);						\
 		res = -1;						\
 	}								\
diff -puN include/asm-frv/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-frv/unistd.h
--- a/include/asm-frv/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-frv/unistd.h
@@ -320,6 +320,7 @@
 #ifdef __KERNEL__
 
 #define NR_syscalls 310
+#include <linux/err.h>
 
 /*
  * process the return value of a syscall, consigning it to one of two possible fates
@@ -329,7 +330,7 @@
 #define __syscall_return(type, res)					\
 do {									\
         unsigned long __sr2 = (res);					\
-	if (__builtin_expect(__sr2 >= (unsigned long)(-4095), 0)) {	\
+	if (__builtin_expect(__sr2 >= (unsigned long)(-MAX_ERRNO), 0)) { \
 		errno = (-__sr2);					\
 		__sr2 = ~0UL;						\
 	}								\
diff -puN include/asm-h8300/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-h8300/unistd.h
--- a/include/asm-h8300/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-h8300/unistd.h
@@ -295,14 +295,14 @@
 #ifdef __KERNEL__
 
 #define NR_syscalls 289
+#include <linux/err.h>
 
-
-/* user-visible error numbers are in the range -1 - -122: see
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO: see
    <asm-m68k/errno.h> */
 
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 	/* avoid using res which is declared to be in register d0; \
 	   errno might expand to a function call and clobber it.  */ \
 		int __err = -(res); \
diff -puN include/asm-i386/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-i386/unistd.h
--- a/include/asm-i386/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-i386/unistd.h
@@ -328,14 +328,15 @@
 #ifdef __KERNEL__
 
 #define NR_syscalls 319
+#include <linux/err.h>
 
 /*
- * user-visible error numbers are in the range -1 - -128: see
+ * user-visible error numbers are in the range -1 - -MAX_ERRNO: see
  * <asm-i386/errno.h>
  */
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-(128 + 1))) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 		errno = -(res); \
 		res = -1; \
 	} \
diff -puN include/asm-m32r/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-m32r/unistd.h
--- a/include/asm-m32r/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-m32r/unistd.h
@@ -296,8 +296,9 @@
 #ifdef __KERNEL__
 
 #define NR_syscalls 285
+#include <linux/err.h>
 
-/* user-visible error numbers are in the range -1 - -124: see
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO: see
  * <asm-m32r/errno.h>
  */
 
@@ -305,7 +306,7 @@
 
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-(124 + 1))) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 	/* Avoid using "res" which is declared to be in register r0; \
 	   errno might expand to a function call and clobber it.  */ \
 		int __err = -(res); \
diff -puN include/asm-m68k/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-m68k/unistd.h
--- a/include/asm-m68k/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-m68k/unistd.h
@@ -288,13 +288,14 @@
 #ifdef __KERNEL__
 
 #define NR_syscalls		282
+#include <linux/err.h>
 
-/* user-visible error numbers are in the range -1 - -124: see
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO: see
    <asm-m68k/errno.h> */
 
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 	/* avoid using res which is declared to be in register d0; \
 	   errno might expand to a function call and clobber it.  */ \
 		int __err = -(res); \
diff -puN include/asm-m68knommu/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-m68knommu/unistd.h
--- a/include/asm-m68knommu/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-m68knommu/unistd.h
@@ -289,13 +289,14 @@
 #ifdef __KERNEL__
 
 #define NR_syscalls		282
+#include <linux/err.h>
 
-/* user-visible error numbers are in the range -1 - -122: see
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO: see
    <asm-m68k/errno.h> */
 
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 	/* avoid using res which is declared to be in register d0; \
 	   errno might expand to a function call and clobber it.  */ \
 		int __err = -(res); \
diff -puN include/asm-s390/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-s390/unistd.h
--- a/include/asm-s390/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-s390/unistd.h
@@ -342,9 +342,11 @@
 
 #ifdef __KERNEL__
 
+#include <linux/err.h>
+
 #define __syscall_return(type, res)			     \
 do {							     \
-	if ((unsigned long)(res) >= (unsigned long)(-4095)) {\
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 		errno = -(res);				     \
 		res = -1;				     \
 	}						     \
diff -puN include/asm-sh/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-sh/unistd.h
--- a/include/asm-sh/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-sh/unistd.h
@@ -306,11 +306,14 @@
 
 #ifdef __KERNEL__
 
-/* user-visible error numbers are in the range -1 - -124: see <asm-sh/errno.h> */
+#include <linux/err.h>
+
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO:
+ * see <asm-sh/errno.h> */
 
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-124)) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 	/* Avoid using "res" which is declared to be in register r0; \
 	   errno might expand to a function call and clobber it.  */ \
 		int __err = -(res); \
diff -puN include/asm-sh64/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-sh64/unistd.h
--- a/include/asm-sh64/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-sh64/unistd.h
@@ -347,8 +347,10 @@
 #ifdef __KERNEL__ 
 
 #define NR_syscalls 321
+#include <linux/err.h>
 
-/* user-visible error numbers are in the range -1 - -125: see <asm-sh64/errno.h> */
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO:
+ * see <asm-sh64/errno.h> */
 
 #define __syscall_return(type, res) \
 do { \
@@ -358,7 +360,7 @@ do { \
 	**       life easier in the system call epilogue (see entry.S)      \
 	*/								    \
         register unsigned long __sr2 __asm__ ("r2") = res;		    \
-	if ((unsigned long)(res) >= (unsigned long)(-125)) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) {	    \
 		errno = -(res);						    \
 		__sr2 = -1; 						    \
 	} \
diff -puN include/asm-v850/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-v850/unistd.h
--- a/include/asm-v850/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-v850/unistd.h
@@ -238,12 +238,13 @@
 #ifdef __KERNEL__
 
 #include <asm/clinkage.h>
+#include <linux/err.h>
 
 #define __syscall_return(type, res)					      \
   do {									      \
-	  /* user-visible error numbers are in the range -1 - -124:	      \
+	  /* user-visible error numbers are in the range -1 - -MAX_ERRNO:      \
 	     see <asm-v850/errno.h> */					      \
-	  if (__builtin_expect ((unsigned long)(res) >= (unsigned long)(-125), 0)) { \
+	  if (__builtin_expect ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO), 0)) { \
 		  errno = -(res);					      \
 		  res = -1;						      \
 	  }								      \
diff -puN include/asm-x86_64/unistd.h~consistently-use-max_errno-in-__syscall_return include/asm-x86_64/unistd.h
--- a/include/asm-x86_64/unistd.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/asm-x86_64/unistd.h
@@ -623,16 +623,17 @@ __SYSCALL(__NR_move_pages, sys_move_page
 #ifdef __KERNEL__
 
 #define __NR_syscall_max __NR_move_pages
+#include <linux/err.h>
 
 #ifndef __NO_STUBS
 
-/* user-visible error numbers are in the range -1 - -4095 */
+/* user-visible error numbers are in the range -1 - -MAX_ERRNO */
 
 #define __syscall_clobber "r11","rcx","memory" 
 
 #define __syscall_return(type, res) \
 do { \
-	if ((unsigned long)(res) >= (unsigned long)(-127)) { \
+	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
 		errno = -(res); \
 		res = -1; \
 	} \
diff -puN include/linux/err.h~consistently-use-max_errno-in-__syscall_return include/linux/err.h
--- a/include/linux/err.h~consistently-use-max_errno-in-__syscall_return
+++ a/include/linux/err.h
@@ -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 *pt
 	return IS_ERR_VALUE((unsigned long)ptr);
 }
 
+#endif
+
 #endif /* _LINUX_ERR_H */
_

Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxx are

origin.patch
git-acpi.patch
acpi-fix-printk-format-warnings.patch
drivers-media-use-null-instead-of-0-for-ptrs.patch
git-lxdialog.patch
mtd-printk-format-warning.patch
pcmcia-ds-must_check-fixes.patch
pcie-check-and-return-bus_register-errors-fix.patch
git-scsi-misc.patch
tiacx-sparse-cleanups.patch
kernel-params-must_check-fixes.patch
blockdevc-check-errors.patch
block-handle-subsystem_register-init-errors.patch
fs-namespace-handle-init-registration-errors.patch
kernel-doc-for-relay-interface.patch
kernel-doc-move-filesystems-together.patch
include-documentation-for-functions-in-drivers-base-classc.patch
fix-parameter-names-in-drivers-base-classc.patch
fix-kerneldoc-comments-in-kernel-timerc-fix.patch
cdev-documentation-was-drop-second-arg-of-unregister_chrdev.patch
docbook-fix-segfault-in-docprocc.patch
doc-fix-kernel-parameters-quiet.patch
mention-documenation-abi-requirements-in-documentation-submitchecklist.patch
allow-proc-configgz-to-be-built-as-a-module.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch
ecryptfs-fix-printk-format-warnings.patch
ide-core-must_check-fixes.patch
documentation-fixes-in-intel810txt.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux