Skip to content

Commit f940dc0

Browse files
committed
csky: cmpxchg: Coding convention for BUILD_BUG()
Use BUILD_BUG() instead of the custom bad_xchg. Signed-off-by: Guo Ren <[email protected]> Signed-off-by: Guo Ren <[email protected]>
1 parent 7f8030c commit f940dc0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

arch/csky/include/asm/cmpxchg.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
#define __ASM_CSKY_CMPXCHG_H
55

66
#ifdef CONFIG_SMP
7+
#include <linux/bug.h>
78
#include <asm/barrier.h>
89

9-
extern void __bad_xchg(void);
10-
1110
#define __xchg_relaxed(new, ptr, size) \
1211
({ \
1312
__typeof__(ptr) __ptr = (ptr); \
@@ -46,7 +45,7 @@ extern void __bad_xchg(void);
4645
:); \
4746
break; \
4847
default: \
49-
__bad_xchg(); \
48+
BUILD_BUG(); \
5049
} \
5150
__ret; \
5251
})
@@ -76,7 +75,7 @@ extern void __bad_xchg(void);
7675
:); \
7776
break; \
7877
default: \
79-
__bad_xchg(); \
78+
BUILD_BUG(); \
8079
} \
8180
__ret; \
8281
})
@@ -107,7 +106,7 @@ extern void __bad_xchg(void);
107106
:); \
108107
break; \
109108
default: \
110-
__bad_xchg(); \
109+
BUILD_BUG(); \
111110
} \
112111
__ret; \
113112
})
@@ -139,7 +138,7 @@ extern void __bad_xchg(void);
139138
:); \
140139
break; \
141140
default: \
142-
__bad_xchg(); \
141+
BUILD_BUG(); \
143142
} \
144143
__ret; \
145144
})

0 commit comments

Comments
 (0)