mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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 <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
2ee60e1789
commit
6bfa9bb519
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
void *memmove(void * dest,const void *src,size_t count)
|
void *memmove(void * dest,const void *src,size_t count)
|
||||||
{
|
{
|
||||||
if (dest < src) {
|
if (dest < src) {
|
||||||
__inline_memcpy(dest,src,count);
|
return memcpy(dest,src,count);
|
||||||
} else {
|
} else {
|
||||||
char *p = (char *) dest + count;
|
char *p = (char *) dest + count;
|
||||||
char *s = (char *) src + count;
|
char *s = (char *) src + count;
|
||||||
|
|
|
@ -55,7 +55,7 @@ strncpy_from_user(char *dst, const char __user *src, long count)
|
||||||
{
|
{
|
||||||
long res = -EFAULT;
|
long res = -EFAULT;
|
||||||
if (access_ok(VERIFY_READ, src, 1))
|
if (access_ok(VERIFY_READ, src, 1))
|
||||||
__do_strncpy_from_user(dst, src, count, res);
|
return __strncpy_from_user(dst, src, count);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(strncpy_from_user);
|
EXPORT_SYMBOL(strncpy_from_user);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue