From 82985258390e85289940d3663344197344e071f2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 7 Apr 2017 17:20:01 -0400 Subject: kill strlen_user() no callers, no consistent semantics, no sane way to use it... Signed-off-by: Al Viro --- arch/m32r/include/asm/uaccess.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'arch/m32r') diff --git a/arch/m32r/include/asm/uaccess.h b/arch/m32r/include/asm/uaccess.h index 07be349c00ad..0273d0481edc 100644 --- a/arch/m32r/include/asm/uaccess.h +++ b/arch/m32r/include/asm/uaccess.h @@ -511,22 +511,6 @@ unsigned long __clear_user(void __user *mem, unsigned long len); */ unsigned long clear_user(void __user *mem, unsigned long len); -/** - * strlen_user: - Get the size of a string in user space. - * @str: The string to measure. - * - * Context: User context only. This function may sleep if pagefaults are - * enabled. - * - * Get the size of a NUL-terminated string in user space. - * - * Returns the size of the string INCLUDING the terminating NUL. - * On exception, returns 0. - * - * If there is a limit on the length of a valid string, you may wish to - * consider using strnlen_user() instead. - */ -#define strlen_user(str) strnlen_user(str, ~0UL >> 1) long strnlen_user(const char __user *str, long n); #endif /* _ASM_M32R_UACCESS_H */ -- cgit v1.2.3 From 10503bf9435f304b7a74ebfdb8571dec001d751c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 7 Apr 2017 17:54:24 -0400 Subject: get rid of unused __strncpy_from_user() instances Signed-off-by: Al Viro --- arch/m32r/include/asm/uaccess.h | 2 -- arch/m32r/kernel/m32r_ksyms.c | 1 - arch/m32r/lib/usercopy.c | 8 -------- 3 files changed, 11 deletions(-) (limited to 'arch/m32r') diff --git a/arch/m32r/include/asm/uaccess.h b/arch/m32r/include/asm/uaccess.h index 0273d0481edc..496c4716dbc8 100644 --- a/arch/m32r/include/asm/uaccess.h +++ b/arch/m32r/include/asm/uaccess.h @@ -482,8 +482,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n) long __must_check strncpy_from_user(char *dst, const char __user *src, long count); -long __must_check __strncpy_from_user(char *dst, - const char __user *src, long count); /** * __clear_user: - Zero a block of memory in user space, with less checking. diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index a4d43b5cc102..68da6b800453 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c @@ -23,7 +23,6 @@ EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(iounmap); EXPORT_SYMBOL(strncpy_from_user); -EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(clear_user); EXPORT_SYMBOL(__clear_user); EXPORT_SYMBOL(strnlen_user); diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c index b3ef2c899f96..b723b11107c7 100644 --- a/arch/m32r/lib/usercopy.c +++ b/arch/m32r/lib/usercopy.c @@ -88,14 +88,6 @@ do { \ #endif /* CONFIG_ISA_DUAL_ISSUE */ -long -__strncpy_from_user(char *dst, const char __user *src, long count) -{ - long res; - __do_strncpy_from_user(dst, src, count, res); - return res; -} - long strncpy_from_user(char *dst, const char __user *src, long count) { -- cgit v1.2.3