* [PATCH 0/2] Fixup and coding convention
@ 2022-08-01 2:42 guoren
2022-08-01 2:42 ` [PATCH 1/2] csky: cmpxchg: Coding convention for BUILD_BUG() guoren
2022-08-01 2:42 ` [PATCH 2/2] csky: abiv1: Fixup compile error guoren
0 siblings, 2 replies; 3+ messages in thread
From: guoren @ 2022-08-01 2:42 UTC (permalink / raw)
To: guoren, arnd; +Cc: linux-csky, linux-arch, linux-kernel, Guo Ren
From: Guo Ren <guoren@linux.alibaba.com>
Two small modifications for fixup abiv1 compile and coding convention.
Guo Ren (2):
csky: cmpxchg: Coding convention for BUILD_BUG()
csky: abiv1: Fixup compile error
arch/csky/abiv1/inc/abi/string.h | 6 ++++++
arch/csky/include/asm/cmpxchg.h | 11 +++++------
2 files changed, 11 insertions(+), 6 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] csky: cmpxchg: Coding convention for BUILD_BUG()
2022-08-01 2:42 [PATCH 0/2] Fixup and coding convention guoren
@ 2022-08-01 2:42 ` guoren
2022-08-01 2:42 ` [PATCH 2/2] csky: abiv1: Fixup compile error guoren
1 sibling, 0 replies; 3+ messages in thread
From: guoren @ 2022-08-01 2:42 UTC (permalink / raw)
To: guoren, arnd; +Cc: linux-csky, linux-arch, linux-kernel, Guo Ren
From: Guo Ren <guoren@linux.alibaba.com>
Use BUILD_BUG() instead of the custom bad_xchg.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
---
arch/csky/include/asm/cmpxchg.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/csky/include/asm/cmpxchg.h b/arch/csky/include/asm/cmpxchg.h
index 5f693fadb56c..916043b845f1 100644
--- a/arch/csky/include/asm/cmpxchg.h
+++ b/arch/csky/include/asm/cmpxchg.h
@@ -4,10 +4,9 @@
#define __ASM_CSKY_CMPXCHG_H
#ifdef CONFIG_SMP
+#include <linux/bug.h>
#include <asm/barrier.h>
-extern void __bad_xchg(void);
-
#define __xchg_relaxed(new, ptr, size) \
({ \
__typeof__(ptr) __ptr = (ptr); \
@@ -46,7 +45,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
- __bad_xchg(); \
+ BUILD_BUG(); \
} \
__ret; \
})
@@ -76,7 +75,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
- __bad_xchg(); \
+ BUILD_BUG(); \
} \
__ret; \
})
@@ -107,7 +106,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
- __bad_xchg(); \
+ BUILD_BUG(); \
} \
__ret; \
})
@@ -139,7 +138,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
- __bad_xchg(); \
+ BUILD_BUG(); \
} \
__ret; \
})
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] csky: abiv1: Fixup compile error
2022-08-01 2:42 [PATCH 0/2] Fixup and coding convention guoren
2022-08-01 2:42 ` [PATCH 1/2] csky: cmpxchg: Coding convention for BUILD_BUG() guoren
@ 2022-08-01 2:42 ` guoren
1 sibling, 0 replies; 3+ messages in thread
From: guoren @ 2022-08-01 2:42 UTC (permalink / raw)
To: guoren, arnd; +Cc: linux-csky, linux-arch, linux-kernel, Guo Ren, stable
From: Guo Ren <guoren@linux.alibaba.com>
LD vmlinux.o
arch/csky/lib/string.o: In function `memmove':
string.c:(.text+0x108): multiple definition of `memmove'
lib/string.o:string.c:(.text+0x7e8): first defined here
arch/csky/lib/string.o: In function `memset':
string.c:(.text+0x148): multiple definition of `memset'
lib/string.o:string.c:(.text+0x2ac): first defined here
scripts/Makefile.vmlinux_o:68: recipe for target 'vmlinux.o' failed
make[4]: *** [vmlinux.o] Error 1
Fixes: e4df2d5e852a ("csky: Add C based string functions")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: <stable@vger.kernel.org>
---
arch/csky/abiv1/inc/abi/string.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/csky/abiv1/inc/abi/string.h b/arch/csky/abiv1/inc/abi/string.h
index 9d95594b0feb..de50117b904d 100644
--- a/arch/csky/abiv1/inc/abi/string.h
+++ b/arch/csky/abiv1/inc/abi/string.h
@@ -6,4 +6,10 @@
#define __HAVE_ARCH_MEMCPY
extern void *memcpy(void *, const void *, __kernel_size_t);
+#define __HAVE_ARCH_MEMMOVE
+extern void *memmove(void *, const void *, __kernel_size_t);
+
+#define __HAVE_ARCH_MEMSET
+extern void *memset(void *, int, __kernel_size_t);
+
#endif /* __ABI_CSKY_STRING_H */
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-01 2:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 2:42 [PATCH 0/2] Fixup and coding convention guoren
2022-08-01 2:42 ` [PATCH 1/2] csky: cmpxchg: Coding convention for BUILD_BUG() guoren
2022-08-01 2:42 ` [PATCH 2/2] csky: abiv1: Fixup compile error guoren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).