m68k: cleanup inline mem functions
PATCH 4/4 m68k: cleanup inline mem functions
Use the builtin functions for memset/memclr/memcpy, special optimizations for page operations have dedicated functions now. Uninline memmove/memchr and move all functions into a single file and clean it up a little.
Signed-off-by Roman Zippel <[email protected]>
---
arch/m68k/kernel/m68k_ksyms.c | 4 arch/m68k/lib/Makefile | 2 arch/m68k/lib/memcmp.c | 11 - arch/m68k/lib/memcpy.c | 75 ------- arch/m68k/lib/memset.c | 68 ------- arch/m68k/lib/string.c | 237 ++++++++++++++++++++++++ include/asm-m68k/string.h | 403 ------------------------------------------ 7 files changed, 245 insertions(+), 555 deletions(-)
arch/m68k/kernel/m68k_ksyms.c +0 -4
@@ -74,10 +74,6 @@ EXPORT_SYMBOL(vme_brdtype);EXPORT_SYMBOL (__ashldi3);EXPORT_SYMBOL (__ashrdi3);EXPORT_SYMBOL (__lshrdi3); -EXPORT_SYMBOL (memcpy); -EXPORT_SYMBOL (memset); -EXPORT_SYMBOL (memcmp); -EXPORT_SYMBOL (memscan);EXPORT_SYMBOL (__muldi3);EXPORT_SYMBOL (__down_failed);
arch/m68k/lib/Makefile +1 -1
@@ -5,4 +5,4 @@ EXTRA_AFLAGS := -traditional lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ - checksum.o memcmp.o memcpy.o memset.o semaphore.o + checksum.o string.o semaphore.o
arch/m68k/lib/memcmp.c deleted +0 -11
@@ -1,11 +0,0 @@ -#include <linux/types.h> - -int memcmp (const void * cs,const void * ct,size_t count) -{ -const unsigned char *su1, *su2; - -for ( su1 = cs, su2 = ct;0 < count; ++su1, ++su2, count--) -if (*su1 != *su2) -return ((*su1 < *su2) ?-1 :+1 ); -return (0 ); -}
arch/m68k/lib/memcpy.c deleted +0 -75
75 lines not on this page · raw message
arch/m68k/lib/memset.c deleted +0 -68
68 lines not on this page · raw message
arch/m68k/lib/string.c new file +237 -0
237 lines not on this page · raw message
include/asm-m68k/string.h +7 -396
420 lines not on this page · raw message