Commit f940dc0f authored by Guo Ren's avatar Guo Ren

csky: cmpxchg: Coding convention for BUILD_BUG()

Use BUILD_BUG() instead of the custom bad_xchg.
Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
parent 7f8030ce
...@@ -4,10 +4,9 @@ ...@@ -4,10 +4,9 @@
#define __ASM_CSKY_CMPXCHG_H #define __ASM_CSKY_CMPXCHG_H
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#include <linux/bug.h>
#include <asm/barrier.h> #include <asm/barrier.h>
extern void __bad_xchg(void);
#define __xchg_relaxed(new, ptr, size) \ #define __xchg_relaxed(new, ptr, size) \
({ \ ({ \
__typeof__(ptr) __ptr = (ptr); \ __typeof__(ptr) __ptr = (ptr); \
...@@ -46,7 +45,7 @@ extern void __bad_xchg(void); ...@@ -46,7 +45,7 @@ extern void __bad_xchg(void);
:); \ :); \
break; \ break; \
default: \ default: \
__bad_xchg(); \ BUILD_BUG(); \
} \ } \
__ret; \ __ret; \
}) })
...@@ -76,7 +75,7 @@ extern void __bad_xchg(void); ...@@ -76,7 +75,7 @@ extern void __bad_xchg(void);
:); \ :); \
break; \ break; \
default: \ default: \
__bad_xchg(); \ BUILD_BUG(); \
} \ } \
__ret; \ __ret; \
}) })
...@@ -107,7 +106,7 @@ extern void __bad_xchg(void); ...@@ -107,7 +106,7 @@ extern void __bad_xchg(void);
:); \ :); \
break; \ break; \
default: \ default: \
__bad_xchg(); \ BUILD_BUG(); \
} \ } \
__ret; \ __ret; \
}) })
...@@ -139,7 +138,7 @@ extern void __bad_xchg(void); ...@@ -139,7 +138,7 @@ extern void __bad_xchg(void);
:); \ :); \
break; \ break; \
default: \ default: \
__bad_xchg(); \ BUILD_BUG(); \
} \ } \
__ret; \ __ret; \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment