s390/uaccess: whitespace cleanup
Whitespace cleanup to get rid if some checkpatch findings, but mainly to have consistent coding style within the header file again. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
a0e3a44bc2
commit
d144182ed1
1 changed files with 66 additions and 66 deletions
|
@ -3,7 +3,7 @@
|
||||||
* S390 version
|
* S390 version
|
||||||
* Copyright IBM Corp. 1999, 2000
|
* Copyright IBM Corp. 1999, 2000
|
||||||
* Author(s): Hartmut Penner (hp@de.ibm.com),
|
* Author(s): Hartmut Penner (hp@de.ibm.com),
|
||||||
* Martin Schwidefsky (schwidefsky@de.ibm.com)
|
* Martin Schwidefsky (schwidefsky@de.ibm.com)
|
||||||
*
|
*
|
||||||
* Derived from "include/asm-i386/uaccess.h"
|
* Derived from "include/asm-i386/uaccess.h"
|
||||||
*/
|
*/
|
||||||
|
@ -194,77 +194,77 @@ static __always_inline int __get_user_fn(void *x, const void __user *ptr, unsign
|
||||||
* These are the main single-value transfer routines. They automatically
|
* These are the main single-value transfer routines. They automatically
|
||||||
* use the right size if we just have the right pointer type.
|
* use the right size if we just have the right pointer type.
|
||||||
*/
|
*/
|
||||||
#define __put_user(x, ptr) \
|
#define __put_user(x, ptr) \
|
||||||
({ \
|
({ \
|
||||||
__typeof__(*(ptr)) __x = (x); \
|
__typeof__(*(ptr)) __x = (x); \
|
||||||
int __pu_err = -EFAULT; \
|
int __pu_err = -EFAULT; \
|
||||||
__chk_user_ptr(ptr); \
|
\
|
||||||
switch (sizeof (*(ptr))) { \
|
__chk_user_ptr(ptr); \
|
||||||
case 1: \
|
switch (sizeof(*(ptr))) { \
|
||||||
case 2: \
|
case 1: \
|
||||||
case 4: \
|
case 2: \
|
||||||
case 8: \
|
case 4: \
|
||||||
__pu_err = __put_user_fn(&__x, ptr, \
|
case 8: \
|
||||||
sizeof(*(ptr))); \
|
__pu_err = __put_user_fn(&__x, ptr, sizeof(*(ptr))); \
|
||||||
break; \
|
break; \
|
||||||
default: \
|
default: \
|
||||||
__put_user_bad(); \
|
__put_user_bad(); \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
__builtin_expect(__pu_err, 0); \
|
__builtin_expect(__pu_err, 0); \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define put_user(x, ptr) \
|
#define put_user(x, ptr) \
|
||||||
({ \
|
({ \
|
||||||
might_fault(); \
|
might_fault(); \
|
||||||
__put_user(x, ptr); \
|
__put_user(x, ptr); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
#define __get_user(x, ptr) \
|
||||||
#define __get_user(x, ptr) \
|
({ \
|
||||||
({ \
|
int __gu_err = -EFAULT; \
|
||||||
int __gu_err = -EFAULT; \
|
\
|
||||||
__chk_user_ptr(ptr); \
|
__chk_user_ptr(ptr); \
|
||||||
switch (sizeof(*(ptr))) { \
|
switch (sizeof(*(ptr))) { \
|
||||||
case 1: { \
|
case 1: { \
|
||||||
unsigned char __x; \
|
unsigned char __x; \
|
||||||
__gu_err = __get_user_fn(&__x, ptr, \
|
\
|
||||||
sizeof(*(ptr))); \
|
__gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
|
||||||
(x) = *(__force __typeof__(*(ptr)) *) &__x; \
|
(x) = *(__force __typeof__(*(ptr)) *)&__x; \
|
||||||
break; \
|
break; \
|
||||||
}; \
|
}; \
|
||||||
case 2: { \
|
case 2: { \
|
||||||
unsigned short __x; \
|
unsigned short __x; \
|
||||||
__gu_err = __get_user_fn(&__x, ptr, \
|
\
|
||||||
sizeof(*(ptr))); \
|
__gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
|
||||||
(x) = *(__force __typeof__(*(ptr)) *) &__x; \
|
(x) = *(__force __typeof__(*(ptr)) *)&__x; \
|
||||||
break; \
|
break; \
|
||||||
}; \
|
}; \
|
||||||
case 4: { \
|
case 4: { \
|
||||||
unsigned int __x; \
|
unsigned int __x; \
|
||||||
__gu_err = __get_user_fn(&__x, ptr, \
|
\
|
||||||
sizeof(*(ptr))); \
|
__gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
|
||||||
(x) = *(__force __typeof__(*(ptr)) *) &__x; \
|
(x) = *(__force __typeof__(*(ptr)) *)&__x; \
|
||||||
break; \
|
break; \
|
||||||
}; \
|
}; \
|
||||||
case 8: { \
|
case 8: { \
|
||||||
unsigned long __x; \
|
unsigned long __x; \
|
||||||
__gu_err = __get_user_fn(&__x, ptr, \
|
\
|
||||||
sizeof(*(ptr))); \
|
__gu_err = __get_user_fn(&__x, ptr, sizeof(*(ptr))); \
|
||||||
(x) = *(__force __typeof__(*(ptr)) *) &__x; \
|
(x) = *(__force __typeof__(*(ptr)) *)&__x; \
|
||||||
break; \
|
break; \
|
||||||
}; \
|
}; \
|
||||||
default: \
|
default: \
|
||||||
__get_user_bad(); \
|
__get_user_bad(); \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
__builtin_expect(__gu_err, 0); \
|
__builtin_expect(__gu_err, 0); \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define get_user(x, ptr) \
|
#define get_user(x, ptr) \
|
||||||
({ \
|
({ \
|
||||||
might_fault(); \
|
might_fault(); \
|
||||||
__get_user(x, ptr); \
|
__get_user(x, ptr); \
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue