powerpc/uaccess: Merge __put_user_size_allowed() into __put_user_size()
__put_user_size_allowed() is only called from __put_user_size() now. Merge them together. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b3baeaec1ee2fbdc653bb6fb27b0be5b846163ef.1612879284.git.christophe.leroy@csgroup.eu
This commit is contained in:
Родитель
6b385d1d7c
Коммит
95d019e0f9
|
@ -108,22 +108,18 @@ static inline bool __access_ok(unsigned long addr, unsigned long size)
|
|||
|
||||
extern long __put_user_bad(void);
|
||||
|
||||
#define __put_user_size_allowed(x, ptr, size, retval) \
|
||||
#define __put_user_size(x, ptr, size, retval) \
|
||||
do { \
|
||||
__label__ __pu_failed; \
|
||||
\
|
||||
retval = 0; \
|
||||
allow_write_to_user(ptr, size); \
|
||||
__put_user_size_goto(x, ptr, size, __pu_failed); \
|
||||
prevent_write_to_user(ptr, size); \
|
||||
break; \
|
||||
\
|
||||
__pu_failed: \
|
||||
retval = -EFAULT; \
|
||||
} while (0)
|
||||
|
||||
#define __put_user_size(x, ptr, size, retval) \
|
||||
do { \
|
||||
allow_write_to_user(ptr, size); \
|
||||
__put_user_size_allowed(x, ptr, size, retval); \
|
||||
prevent_write_to_user(ptr, size); \
|
||||
} while (0)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче