xtensa: fix memscan()
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 3 Feb 2012 23:37:13 +0000 (15:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 4 Feb 2012 00:16:40 +0000 (16:16 -0800)
Defining memscan() as memchr() is wrong, because the return values of
memscan() and memchr() are different when the character is not found.  So
use the generic memscan() implementation to fix this.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

arch/xtensa/include/asm/string.h

index 5fb8c27..405a8c4 100644 (file)
@@ -118,7 +118,4 @@ extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
 /* Don't build bcopy at all ...  */
 #define __HAVE_ARCH_BCOPY
 
-#define __HAVE_ARCH_MEMSCAN
-#define memscan memchr
-
 #endif /* _XTENSA_STRING_H */