From 6bfa9bb5195c68f75bd3937e4d77cb0bfe852d0d Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 26 Jun 2006 13:59:47 +0200 Subject: [PATCH] [PATCH] x86_64: Minor string functions optimizations - Use tail call from clear_user to __clear_user to save some code size - Use standard memcpy for forward memmove Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/lib/memmove.c | 2 +- arch/x86_64/lib/usercopy.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/lib/memmove.c b/arch/x86_64/lib/memmove.c index 517eb1bd9de5..751ebae8ec42 100644 --- a/arch/x86_64/lib/memmove.c +++ b/arch/x86_64/lib/memmove.c @@ -9,7 +9,7 @@ void *memmove(void * dest,const void *src,size_t count) { if (dest < src) { - __inline_memcpy(dest,src,count); + return memcpy(dest,src,count); } else { char *p = (char *) dest + count; char *s = (char *) src + count; diff --git a/arch/x86_64/lib/usercopy.c b/arch/x86_64/lib/usercopy.c index a82bfacdb1af..893d43f838cc 100644 --- a/arch/x86_64/lib/usercopy.c +++ b/arch/x86_64/lib/usercopy.c @@ -55,7 +55,7 @@ strncpy_from_user(char *dst, const char __user *src, long count) { long res = -EFAULT; if (access_ok(VERIFY_READ, src, 1)) - __do_strncpy_from_user(dst, src, count, res); + return __strncpy_from_user(dst, src, count); return res; } EXPORT_SYMBOL(strncpy_from_user); -- 2.20.1