aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/string.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-10-21 13:40:32 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-10-26 15:21:30 +0200
commiteec013bbf66fd17fc5671de6744913cb68036a00 (patch)
treec7a3bd600562d91b4735baeb4b3a9b7a45640cdf /arch/s390/lib/string.c
parent132c1e74aa7f8f9d33552645d2c35d3d8f9f0cf1 (diff)
s390/string: use generic strrchr
Use generic strrchr instead of an optimized architecture specific variant. Performance of strrchr is not relevant for real life workloads, since the only user which may call this more frequently would be kbasename(). Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/lkml/CAHk-=whoe211F8ND-9hZvfnib0UA4gga8DZJ+YaBZNbE4fubdg@mail.gmail.com/ Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/lib/string.c')
-rw-r--r--arch/s390/lib/string.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c
index a95ca6df4e5e..4c2d1a8949cc 100644
--- a/arch/s390/lib/string.c
+++ b/arch/s390/lib/string.c
@@ -251,25 +251,6 @@ int strcmp(const char *s1, const char *s2)
EXPORT_SYMBOL(strcmp);
#endif
-/**
- * strrchr - Find the last occurrence of a character in a string
- * @s: The string to be searched
- * @c: The character to search for
- */
-#ifdef __HAVE_ARCH_STRRCHR
-char *strrchr(const char *s, int c)
-{
- ssize_t len = __strend(s) - s;
-
- do {
- if (s[len] == (char)c)
- return (char *)s + len;
- } while (--len >= 0);
- return NULL;
-}
-EXPORT_SYMBOL(strrchr);
-#endif
-
static inline int clcle(const char *s1, unsigned long l1,
const char *s2, unsigned long l2)
{

Privacy Policy