aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-18 13:02:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-18 13:02:24 -0500
commiteaa0eda56223815cd9dc1225f715ff673ae77198 (patch)
tree12ed5208dda2ecbf2a652d6c54f83c58f362707d /arch/avr32
parentcad3ab5883b35b044200820bf2e1fbabe742740a (diff)
parent643165c8bbc8617d8222cb50c89e34fe64d226cf (diff)
Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic uaccess.h cleanup from Arnd Bergmann: "Like in 3.19, I once more have a multi-stage cleanup for one asm-generic header file, this time the work was done by Michael Tsirkin and cleans up the uaccess.h file in asm-generic, as well as all architectures for which the respective maintainers did not pick up his patches directly" * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (37 commits) sparc32: nocheck uaccess coding style tweaks sparc64: nocheck uaccess coding style tweaks xtensa: macro whitespace fixes sh: macro whitespace fixes parisc: macro whitespace fixes m68k: macro whitespace fixes m32r: macro whitespace fixes frv: macro whitespace fixes cris: macro whitespace fixes avr32: macro whitespace fixes arm64: macro whitespace fixes arm: macro whitespace fixes alpha: macro whitespace fixes blackfin: macro whitespace fixes sparc64: uaccess_64 macro whitespace fixes sparc32: uaccess_32 macro whitespace fixes avr32: whitespace fix sh: fix put_user sparse errors metag: fix put_user sparse errors ia64: fix put_user sparse errors ...
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/include/asm/uaccess.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/avr32/include/asm/uaccess.h b/arch/avr32/include/asm/uaccess.h
index 245b2ee213c9..a46f7cf3e1ea 100644
--- a/arch/avr32/include/asm/uaccess.h
+++ b/arch/avr32/include/asm/uaccess.h
@@ -26,7 +26,7 @@ typedef struct {
26 * For historical reasons (Data Segment Register?), these macros are misnamed. 26 * For historical reasons (Data Segment Register?), these macros are misnamed.
27 */ 27 */
28#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) 28#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
29#define segment_eq(a,b) ((a).is_user_space == (b).is_user_space) 29#define segment_eq(a, b) ((a).is_user_space == (b).is_user_space)
30 30
31#define USER_ADDR_LIMIT 0x80000000 31#define USER_ADDR_LIMIT 0x80000000
32 32
@@ -108,8 +108,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
108 * 108 *
109 * Returns zero on success, or -EFAULT on error. 109 * Returns zero on success, or -EFAULT on error.
110 */ 110 */
111#define put_user(x,ptr) \ 111#define put_user(x, ptr) \
112 __put_user_check((x),(ptr),sizeof(*(ptr))) 112 __put_user_check((x), (ptr), sizeof(*(ptr)))
113 113
114/* 114/*
115 * get_user: - Get a simple variable from user space. 115 * get_user: - Get a simple variable from user space.
@@ -128,8 +128,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
128 * Returns zero on success, or -EFAULT on error. 128 * Returns zero on success, or -EFAULT on error.
129 * On error, the variable @x is set to zero. 129 * On error, the variable @x is set to zero.
130 */ 130 */
131#define get_user(x,ptr) \ 131#define get_user(x, ptr) \
132 __get_user_check((x),(ptr),sizeof(*(ptr))) 132 __get_user_check((x), (ptr), sizeof(*(ptr)))
133 133
134/* 134/*
135 * __put_user: - Write a simple value into user space, with less checking. 135 * __put_user: - Write a simple value into user space, with less checking.
@@ -150,8 +150,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
150 * 150 *
151 * Returns zero on success, or -EFAULT on error. 151 * Returns zero on success, or -EFAULT on error.
152 */ 152 */
153#define __put_user(x,ptr) \ 153#define __put_user(x, ptr) \
154 __put_user_nocheck((x),(ptr),sizeof(*(ptr))) 154 __put_user_nocheck((x), (ptr), sizeof(*(ptr)))
155 155
156/* 156/*
157 * __get_user: - Get a simple variable from user space, with less checking. 157 * __get_user: - Get a simple variable from user space, with less checking.
@@ -173,8 +173,8 @@ static inline __kernel_size_t __copy_from_user(void *to,
173 * Returns zero on success, or -EFAULT on error. 173 * Returns zero on success, or -EFAULT on error.
174 * On error, the variable @x is set to zero. 174 * On error, the variable @x is set to zero.
175 */ 175 */
176#define __get_user(x,ptr) \ 176#define __get_user(x, ptr) \
177 __get_user_nocheck((x),(ptr),sizeof(*(ptr))) 177 __get_user_nocheck((x), (ptr), sizeof(*(ptr)))
178 178
179extern int __get_user_bad(void); 179extern int __get_user_bad(void);
180extern int __put_user_bad(void); 180extern int __put_user_bad(void);
@@ -191,7 +191,7 @@ extern int __put_user_bad(void);
191 default: __gu_err = __get_user_bad(); break; \ 191 default: __gu_err = __get_user_bad(); break; \
192 } \ 192 } \
193 \ 193 \
194 x = (typeof(*(ptr)))__gu_val; \ 194 x = (__force typeof(*(ptr)))__gu_val; \
195 __gu_err; \ 195 __gu_err; \
196}) 196})
197 197
@@ -222,7 +222,7 @@ extern int __put_user_bad(void);
222 } else { \ 222 } else { \
223 __gu_err = -EFAULT; \ 223 __gu_err = -EFAULT; \
224 } \ 224 } \
225 x = (typeof(*(ptr)))__gu_val; \ 225 x = (__force typeof(*(ptr)))__gu_val; \
226 __gu_err; \ 226 __gu_err; \
227}) 227})
228 228
@@ -278,7 +278,7 @@ extern int __put_user_bad(void);
278 __pu_err); \ 278 __pu_err); \
279 break; \ 279 break; \
280 case 8: \ 280 case 8: \
281 __put_user_asm("d", __pu_addr, __pu_val, \ 281 __put_user_asm("d", __pu_addr, __pu_val, \
282 __pu_err); \ 282 __pu_err); \
283 break; \ 283 break; \
284 default: \ 284 default: \