diff options
Diffstat (limited to 'arch/powerpc')
| -rw-r--r-- | arch/powerpc/boot/string.S | 13 | ||||
| -rw-r--r-- | arch/powerpc/boot/string.h | 1 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/string.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/lib/string.S | 22 |
4 files changed, 0 insertions, 38 deletions
diff --git a/arch/powerpc/boot/string.S b/arch/powerpc/boot/string.S index d2a2dbf1eefc..76801eb6d937 100644 --- a/arch/powerpc/boot/string.S +++ b/arch/powerpc/boot/string.S @@ -18,19 +18,6 @@ strcpy: bne 1b blr - .globl strncpy -strncpy: - cmpwi 0,r5,0 - beqlr - mtctr r5 - addi r6,r3,-1 - addi r4,r4,-1 -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - stbu r0,1(r6) - bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ - blr - .globl strcat strcat: addi r5,r3,-1 diff --git a/arch/powerpc/boot/string.h b/arch/powerpc/boot/string.h index 8c2ec0c05e4e..2b28d185343c 100644 --- a/arch/powerpc/boot/string.h +++ b/arch/powerpc/boot/string.h @@ -4,7 +4,6 @@ #include <stddef.h> extern char *strcpy(char *dest, const char *src); -extern char *strncpy(char *dest, const char *src, size_t n); extern char *strcat(char *dest, const char *src); extern char *strchr(const char *s, int c); extern char *strrchr(const char *s, int c); diff --git a/arch/powerpc/include/asm/string.h b/arch/powerpc/include/asm/string.h index 60ba22770f51..1981bd4036b5 100644 --- a/arch/powerpc/include/asm/string.h +++ b/arch/powerpc/include/asm/string.h @@ -5,7 +5,6 @@ #ifdef __KERNEL__ #ifndef CONFIG_KASAN -#define __HAVE_ARCH_STRNCPY #define __HAVE_ARCH_STRNCMP #define __HAVE_ARCH_MEMCHR #define __HAVE_ARCH_MEMCMP @@ -18,7 +17,6 @@ #define __HAVE_ARCH_MEMCPY_FLUSHCACHE extern char * strcpy(char *,const char *); -extern char * strncpy(char *,const char *, __kernel_size_t); extern __kernel_size_t strlen(const char *); extern int strcmp(const char *,const char *); extern int strncmp(const char *, const char *, __kernel_size_t); diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index daa72061dc0c..c3f5e7d31ee7 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S @@ -10,28 +10,6 @@ .text -/* This clears out any unused part of the destination buffer, - just as the libc version does. -- paulus */ -_GLOBAL(strncpy) - PPC_LCMPI 0,r5,0 - beqlr - mtctr r5 - addi r6,r3,-1 - addi r4,r4,-1 - .balign IFETCH_ALIGN_BYTES -1: lbzu r0,1(r4) - cmpwi 0,r0,0 - stbu r0,1(r6) - bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */ - bnelr /* if we didn't hit a null char, we're done */ - mfctr r5 - PPC_LCMPI 0,r5,0 /* any space left in destination buffer? */ - beqlr /* we know r0 == 0 here */ -2: stbu r0,1(r6) /* clear it out if so */ - bdnz 2b - blr -EXPORT_SYMBOL(strncpy) - _GLOBAL(strncmp) PPC_LCMPI 0,r5,0 beq- 2f |
