diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-07 23:59:07 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-16 05:40:32 +0200 |
commit | 8f3ba02decc943815b6a1bacfbbd39f9850a7def (patch) | |
tree | 8d75cf87160a1c114ae8a74d9fbd1d11ac7ef0a2 /arch/mips/include/asm/uaccess.h | |
parent | get rid of unused __strncpy_from_user() instances (diff) | |
download | linux-8f3ba02decc943815b6a1bacfbbd39f9850a7def.tar.xz linux-8f3ba02decc943815b6a1bacfbbd39f9850a7def.zip |
mips: get rid of unused __strnlen_user()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/include/asm/uaccess.h')
-rw-r--r-- | arch/mips/include/asm/uaccess.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 14d5f2e04971..9700251159b1 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h @@ -1019,38 +1019,6 @@ strncpy_from_user(char *__to, const char __user *__from, long __len) return res; } -extern long __strnlen_kernel_nocheck_asm(const char __user *s, long n); -extern long __strnlen_user_nocheck_asm(const char __user *s, long n); - -/* Returns: 0 if bad, string length+1 (memory size) of string if ok */ -static inline long __strnlen_user(const char __user *s, long n) -{ - long res; - - if (eva_kernel_access()) { - __asm__ __volatile__( - "move\t$4, %1\n\t" - "move\t$5, %2\n\t" - __MODULE_JAL(__strnlen_kernel_nocheck_asm) - "move\t%0, $2" - : "=r" (res) - : "r" (s), "r" (n) - : "$2", "$4", "$5", __UA_t0, "$31"); - } else { - might_fault(); - __asm__ __volatile__( - "move\t$4, %1\n\t" - "move\t$5, %2\n\t" - __MODULE_JAL(__strnlen_user_nocheck_asm) - "move\t%0, $2" - : "=r" (res) - : "r" (s), "r" (n) - : "$2", "$4", "$5", __UA_t0, "$31"); - } - - return res; -} - extern long __strnlen_kernel_asm(const char __user *s, long n); extern long __strnlen_user_asm(const char __user *s, long n); |