summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2011-01-08 21:57:48 +0100
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-01-22 19:32:54 +0100
commitf9b07897c6288d7e5fc1fd004fccb0c5f1a0e570 (patch)
tree6a998c45cde7a37643d762e621a28a4ec19f80b0 /arch
parent1bae4ce27c9c90344f23c65ea6966c50ffeae2f5 (diff)
downloadblackbird-op-linux-f9b07897c6288d7e5fc1fd004fccb0c5f1a0e570.tar.gz
blackbird-op-linux-f9b07897c6288d7e5fc1fd004fccb0c5f1a0e570.zip
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.h12
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)
strcpy(__d + strlen(__d), (s)); \
})
-#define __HAVE_ARCH_STRCHR
-static inline char *strchr(const char *s, int c)
-{
- char sc, ch = c;
-
- for (; (sc = *s++) != ch; ) {
- if (!sc)
- return NULL;
- }
- return (char *)s - 1;
-}
-
#ifndef CONFIG_COLDFIRE
#define __HAVE_ARCH_STRCMP
static inline int strcmp(const char *cs, const char *ct)
OpenPOWER on IntegriCloud