Skip to content

Commit

Permalink
csky: cmpxchg: Coding convention for BUILD_BUG()
Browse files Browse the repository at this point in the history
Use BUILD_BUG() instead of the custom bad_xchg.

Signed-off-by: Guo Ren <[email protected]>
Signed-off-by: Guo Ren <[email protected]>
  • Loading branch information
guoren83 committed Aug 1, 2022
1 parent 7f8030c commit f940dc0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions arch/csky/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down Expand Up @@ -46,7 +45,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
__bad_xchg(); \
BUILD_BUG(); \
} \
__ret; \
})
Expand Down Expand Up @@ -76,7 +75,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
__bad_xchg(); \
BUILD_BUG(); \
} \
__ret; \
})
Expand Down Expand Up @@ -107,7 +106,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
__bad_xchg(); \
BUILD_BUG(); \
} \
__ret; \
})
Expand Down Expand Up @@ -139,7 +138,7 @@ extern void __bad_xchg(void);
:); \
break; \
default: \
__bad_xchg(); \
BUILD_BUG(); \
} \
__ret; \
})
Expand Down

0 comments on commit f940dc0

Please sign in to comment.