diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-01-08 15:57:48 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-01-22 13:32:54 -0500 |
commit | f9b07897c6288d7e5fc1fd004fccb0c5f1a0e570 (patch) | |
tree | 6a998c45cde7a37643d762e621a28a4ec19f80b0 /arch | |
parent | 1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff) |
m68k: Uninline strchr()
Some versions of gcc replace calls to strstr() with single-character
"needle" string parameters by calls to strchr() behind our back.
If strchr() is defined as an inline function, this causes linking errors
like
ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined!
As m68k is the only architecture that has an inline strchr() and this
inline version is not an optimized asm version, uninline strchr() and use
the standard out-of-line C version in lib/string.c instead.
This also decreases the defconfig/allmodconfig kernel image sizes by a few
hundred bytes.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/include/asm/string.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index 2936dda938d7..65b131282837 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h | |||
@@ -81,18 +81,6 @@ static inline char *strncpy(char *dest, const char *src, size_t n) | |||
81 | strcpy(__d + strlen(__d), (s)); \ | 81 | strcpy(__d + strlen(__d), (s)); \ |
82 | }) | 82 | }) |
83 | 83 | ||
84 | #define __HAVE_ARCH_STRCHR | ||
85 | static inline char *strchr(const char *s, int c) | ||
86 | { | ||
87 | char sc, ch = c; | ||
88 | |||
89 | for (; (sc = *s++) != ch; ) { | ||
90 | if (!sc) | ||
91 | return NULL; | ||
92 | } | ||
93 | return (char *)s - 1; | ||
94 | } | ||
95 | |||
96 | #ifndef CONFIG_COLDFIRE | 84 | #ifndef CONFIG_COLDFIRE |
97 | #define __HAVE_ARCH_STRCMP | 85 | #define __HAVE_ARCH_STRCMP |
98 | static inline int strcmp(const char *cs, const char *ct) | 86 | static inline int strcmp(const char *cs, const char *ct) |