hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/sh/include/asm/string_32.h
....@@ -1,7 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 #ifndef __ASM_SH_STRING_H
23 #define __ASM_SH_STRING_H
3
-
4
-#ifdef __KERNEL__
54
65 /*
76 * Copyright (C) 1999 Niibe Yutaka
....@@ -23,32 +22,6 @@
2322 : "=r" (__dest), "=r" (__src), "=&z" (__dummy)
2423 : "0" (__dest), "1" (__src)
2524 : "memory", "t");
26
-
27
- return __xdest;
28
-}
29
-
30
-#define __HAVE_ARCH_STRNCPY
31
-static inline char *strncpy(char *__dest, const char *__src, size_t __n)
32
-{
33
- register char *__xdest = __dest;
34
- unsigned long __dummy;
35
-
36
- if (__n == 0)
37
- return __xdest;
38
-
39
- __asm__ __volatile__(
40
- "1:\n"
41
- "mov.b @%1+, %2\n\t"
42
- "mov.b %2, @%0\n\t"
43
- "cmp/eq #0, %2\n\t"
44
- "bt/s 2f\n\t"
45
- " cmp/eq %5,%1\n\t"
46
- "bf/s 1b\n\t"
47
- " add #1, %0\n"
48
- "2:"
49
- : "=r" (__dest), "=r" (__src), "=&z" (__dummy)
50
- : "0" (__dest), "1" (__src), "r" (__src+__n)
51
- : "memory", "t");
5225
5326 return __xdest;
5427 }
....@@ -125,7 +98,5 @@
12598
12699 #define __HAVE_ARCH_STRLEN
127100 extern size_t strlen(const char *);
128
-
129
-#endif /* __KERNEL__ */
130101
131102 #endif /* __ASM_SH_STRING_H */