summaryrefslogtreecommitdiff
path: root/arch/s390/lib/string.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2025-04-24 11:27:11 +0200
committerHeiko Carstens <hca@linux.ibm.com>2025-04-30 11:41:28 +0200
commitde6b4f99010ad22f0242f1fc0f75c0752a56e9bb (patch)
treeb5b839e2369d266db5468cd86572839923bf1450 /arch/s390/lib/string.c
parented5eef1141a35551a56c9cc0c475f0e0b6291e77 (diff)
s390/string: Remove strcpy() implementation
Remove the optimized strcpy() library implementation. This doesn't make any difference since gcc recognizes all strcpy() usages anyway and uses the builtin variant. There is not a single branch to strcpy() within the generated kernel image, which also seems to be the reason why most other architectures don't have a strcpy() implementation anymore. Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/lib/string.c')
-rw-r--r--arch/s390/lib/string.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c
index cc00804c6dac..099de76e8b1a 100644
--- a/arch/s390/lib/string.c
+++ b/arch/s390/lib/string.c
@@ -78,30 +78,6 @@ EXPORT_SYMBOL(strnlen);
#endif
/**
- * strcpy - Copy a %NUL terminated string
- * @dest: Where to copy the string to
- * @src: Where to copy the string from
- *
- * returns a pointer to @dest
- */
-#ifdef __HAVE_ARCH_STRCPY
-char *strcpy(char *dest, const char *src)
-{
- char *ret = dest;
-
- asm volatile(
- " lghi 0,0\n"
- "0: mvst %[dest],%[src]\n"
- " jo 0b\n"
- : [dest] "+&a" (dest), [src] "+&a" (src)
- :
- : "cc", "memory", "0");
- return ret;
-}
-EXPORT_SYMBOL(strcpy);
-#endif
-
-/**
* strcat - Append one %NUL-terminated string to another
* @dest: The string to be appended to
* @src: The string to append to it