diff options
author | Michal Marek <mmarek@suse.cz> | 2013-04-10 16:45:21 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-04-16 21:35:43 +0200 |
commit | e00c73ee05dc38ecaccced55d4f5fc58b0b769f7 (patch) | |
tree | 484ae1dfa6e4d7c57bfdd17106bab1a1639f66c5 /arch/m68k/include | |
parent | 01a18d168776f27309e49c983415de9851d6cb57 (diff) |
m68k: Remove inline strlen() implementation
GCC can replace a strncat() call with constant second argument into a
strlen + store, which results in a link error:
ERROR: "strlen" [net/ipv4/ip_tunnel.ko] undefined!
The inline function is a simple for loop in C. Other architectures
either use an asm optimized variant, or use the generic function from
lib/string.c.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include')
-rw-r--r-- | arch/m68k/include/asm/string.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index 32198454da7..9aea9f11fa2 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h @@ -4,15 +4,6 @@ #include <linux/types.h> #include <linux/compiler.h> -static inline size_t __kernel_strlen(const char *s) -{ - const char *sc; - - for (sc = s; *sc++; ) - ; - return sc - s - 1; -} - static inline char *__kernel_strcpy(char *dest, const char *src) { char *xdest = dest; @@ -27,11 +18,6 @@ static inline char *__kernel_strcpy(char *dest, const char *src) #ifndef __IN_STRING_C -#define __HAVE_ARCH_STRLEN -#define strlen(s) (__builtin_constant_p(s) ? \ - __builtin_strlen(s) : \ - __kernel_strlen(s)) - #define __HAVE_ARCH_STRNLEN static inline size_t strnlen(const char *s, size_t count) { |