Commit b2347fad authored by Joe Perches's avatar Joe Perches Committed by Ingo Molnar

include/asm-x86/mutex_32.h: checkpatch cleanups - formatting only

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 9969b440
...@@ -28,13 +28,11 @@ do { \ ...@@ -28,13 +28,11 @@ do { \
typecheck(atomic_t *, count); \ typecheck(atomic_t *, count); \
typecheck_fn(void (*)(atomic_t *), fail_fn); \ typecheck_fn(void (*)(atomic_t *), fail_fn); \
\ \
__asm__ __volatile__( \ asm volatile(LOCK_PREFIX " decl (%%eax)\n" \
LOCK_PREFIX " decl (%%eax) \n" \
" jns 1f \n" \ " jns 1f \n" \
" call "#fail_fn" \n" \ " call " #fail_fn "\n" \
"1: \n" \ "1:\n" \
\ : "=a" (dummy) \
:"=a" (dummy) \
: "a" (count) \ : "a" (count) \
: "memory", "ecx", "edx"); \ : "memory", "ecx", "edx"); \
} while (0) } while (0)
...@@ -50,8 +48,8 @@ do { \ ...@@ -50,8 +48,8 @@ do { \
* wasn't 1 originally. This function returns 0 if the fastpath succeeds, * wasn't 1 originally. This function returns 0 if the fastpath succeeds,
* or anything the slow path function returns * or anything the slow path function returns
*/ */
static inline int static inline int __mutex_fastpath_lock_retval(atomic_t *count,
__mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) int (*fail_fn)(atomic_t *))
{ {
if (unlikely(atomic_dec_return(count) < 0)) if (unlikely(atomic_dec_return(count) < 0))
return fail_fn(count); return fail_fn(count);
...@@ -79,13 +77,11 @@ do { \ ...@@ -79,13 +77,11 @@ do { \
typecheck(atomic_t *, count); \ typecheck(atomic_t *, count); \
typecheck_fn(void (*)(atomic_t *), fail_fn); \ typecheck_fn(void (*)(atomic_t *), fail_fn); \
\ \
__asm__ __volatile__( \ asm volatile(LOCK_PREFIX " incl (%%eax)\n" \
LOCK_PREFIX " incl (%%eax) \n" \ " jg 1f\n" \
" jg 1f \n" \ " call " #fail_fn "\n" \
" call "#fail_fn" \n" \ "1:\n" \
"1: \n" \ : "=a" (dummy) \
\
:"=a" (dummy) \
: "a" (count) \ : "a" (count) \
: "memory", "ecx", "edx"); \ : "memory", "ecx", "edx"); \
} while (0) } while (0)
...@@ -104,8 +100,8 @@ do { \ ...@@ -104,8 +100,8 @@ do { \
* Additionally, if the value was < 0 originally, this function must not leave * Additionally, if the value was < 0 originally, this function must not leave
* it to 0 on failure. * it to 0 on failure.
*/ */
static inline int static inline int __mutex_fastpath_trylock(atomic_t *count,
__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) int (*fail_fn)(atomic_t *))
{ {
/* /*
* We have two variants here. The cmpxchg based one is the best one * We have two variants here. The cmpxchg based one is the best one
......
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