summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 15:50:47 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 15:50:47 -0800
commit4cec87361462d570d6a67888feda41e77e0a9562 (patch)
tree1113096b2aa214f456cfecbbd5974e7efe8f6b27
parent7e4e574c391cdeef516411eb698ac6955f01d673 (diff)
downloadop-kernel-dev-4cec87361462d570d6a67888feda41e77e0a9562.zip
op-kernel-dev-4cec87361462d570d6a67888feda41e77e0a9562.tar.gz
Fix mutex_trylock() copy-and-paste bug (x86, x86-64, generic mutex-dec.h)
Noticed by Arjan originally on x86-64, then Ingo on x86, and finally me grepping for it in the generic version. Bad parenthesis nesting. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-generic/mutex-dec.h2
-rw-r--r--include/asm-i386/mutex.h2
-rw-r--r--include/asm-x86_64/mutex.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-generic/mutex-dec.h b/include/asm-generic/mutex-dec.h
index 74b18cd..40c6d1f 100644
--- a/include/asm-generic/mutex-dec.h
+++ b/include/asm-generic/mutex-dec.h
@@ -97,7 +97,7 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
* the mutex state would be.
*/
#ifdef __HAVE_ARCH_CMPXCHG
- if (likely(atomic_cmpxchg(count, 1, 0)) == 1) {
+ if (likely(atomic_cmpxchg(count, 1, 0) == 1)) {
smp_mb();
return 1;
}
diff --git a/include/asm-i386/mutex.h b/include/asm-i386/mutex.h
index c657d4b..9b2199e 100644
--- a/include/asm-i386/mutex.h
+++ b/include/asm-i386/mutex.h
@@ -125,7 +125,7 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
* the mutex state would be.
*/
#ifdef __HAVE_ARCH_CMPXCHG
- if (likely(atomic_cmpxchg(count, 1, 0)) == 1)
+ if (likely(atomic_cmpxchg(count, 1, 0) == 1))
return 1;
return 0;
#else
diff --git a/include/asm-x86_64/mutex.h b/include/asm-x86_64/mutex.h
index 818abfd..11fbee2 100644
--- a/include/asm-x86_64/mutex.h
+++ b/include/asm-x86_64/mutex.h
@@ -104,7 +104,7 @@ do { \
static inline int
__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
{
- if (likely(atomic_cmpxchg(count, 1, 0)) == 1)
+ if (likely(atomic_cmpxchg(count, 1, 0) == 1))
return 1;
else
return 0;
OpenPOWER on IntegriCloud