[1/3] nds32: Cleanup deprecated function strlen_user
diff mbox series

Message ID 1618925829-90071-1-git-send-email-guoren@kernel.org
State New
Headers show
Series
  • [1/3] nds32: Cleanup deprecated function strlen_user
Related show

Commit Message

Guo Ren April 20, 2021, 1:37 p.m. UTC
From: Guo Ren <guoren@linux.alibaba.com>

$ grep strlen_user * -r
arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
arch/mips/lib/strnlen_user.S: *  make strlen_user and strnlen_user access the first few KSEG0
arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
kernel/trace/trace_probe_tmpl.h:                        ret += fetch_store_strlen_user(val + code->offset);
kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
kernel/trace/trace_kprobe.c:            return fetch_store_strlen_user(addr);

See grep result, nobody uses it.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 arch/nds32/include/asm/uaccess.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Christoph Hellwig April 20, 2021, 2:38 p.m. UTC | #1
Can you also clean up the reference to strlen_user in the comments
in the ia64 and mips code, please?
Greentime Hu April 20, 2021, 3:20 p.m. UTC | #2
<guoren@kernel.org> 於 2021年4月20日 週二 下午9:38寫道:
>
> From: Guo Ren <guoren@linux.alibaba.com>
>
> $ grep strlen_user * -r
> arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
> arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
> arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
> arch/mips/lib/strnlen_user.S: *  make strlen_user and strnlen_user access the first few KSEG0
> arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
> arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
> arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
> kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
> kernel/trace/trace_probe_tmpl.h:                        ret += fetch_store_strlen_user(val + code->offset);
> kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
> kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
> kernel/trace/trace_kprobe.c:            return fetch_store_strlen_user(addr);
>
> See grep result, nobody uses it.
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/nds32/include/asm/uaccess.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/nds32/include/asm/uaccess.h b/arch/nds32/include/asm/uaccess.h
> index 010ba5f..d4cbf06 100644
> --- a/arch/nds32/include/asm/uaccess.h
> +++ b/arch/nds32/include/asm/uaccess.h
> @@ -260,7 +260,6 @@ do {                                                                        \
>
>  extern unsigned long __arch_clear_user(void __user * addr, unsigned long n);
>  extern long strncpy_from_user(char *dest, const char __user * src, long count);
> -extern __must_check long strlen_user(const char __user * str);
>  extern __must_check long strnlen_user(const char __user * str, long n);
>  extern unsigned long __arch_copy_from_user(void *to, const void __user * from,
>                                             unsigned long n);

Thank you, Guo.
Acked-by: Greentime Hu <green.hu@gmail.com>

Patch
diff mbox series

diff --git a/arch/nds32/include/asm/uaccess.h b/arch/nds32/include/asm/uaccess.h
index 010ba5f..d4cbf06 100644
--- a/arch/nds32/include/asm/uaccess.h
+++ b/arch/nds32/include/asm/uaccess.h
@@ -260,7 +260,6 @@  do {									\
 
 extern unsigned long __arch_clear_user(void __user * addr, unsigned long n);
 extern long strncpy_from_user(char *dest, const char __user * src, long count);
-extern __must_check long strlen_user(const char __user * str);
 extern __must_check long strnlen_user(const char __user * str, long n);
 extern unsigned long __arch_copy_from_user(void *to, const void __user * from,
                                            unsigned long n);