From: Chen, Kenneth W Date: Sat, 8 Apr 2006 00:12:54 +0000 (-0700) Subject: [IA64] fix bug in ia64 __mutex_fastpath_trylock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cfab9d0e1da8e08a39759d0fc3bf5e40f0ac2d55;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [IA64] fix bug in ia64 __mutex_fastpath_trylock The parenthesis around "likely" used in ia64 __mutex_fastpath_trylock is incorrect, and it leads to broken mutex_trylock. Here is the patch that fixed the bug. I removed the likely altogether because there is no branch and gcc does a reasonable job at predicating the return value. Signed-off-by: Ken Chen Signed-off-by: Tony Luck --- diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h index 5a3224f6af3..bed73a643a5 100644 --- a/include/asm-ia64/mutex.h +++ b/include/asm-ia64/mutex.h @@ -84,7 +84,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) static inline int __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) { - if (likely(cmpxchg_acq(count, 1, 0)) == 1) + if (cmpxchg_acq(count, 1, 0) == 1) return 1; return 0; }