Merge tag 'v3.10.108' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / powerpc / include / asm / atomic.h
index e3b1d41c89be73425595b364370c096206a6a843..84bcdfa410ffc952bcc196f78ade06dea04d2937 100644 (file)
@@ -501,7 +501,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
  * Atomically increments @v by 1, so long as @v is non-zero.
  * Returns non-zero if @v was non-zero, and zero otherwise.
  */
  * Atomically increments @v by 1, so long as @v is non-zero.
  * Returns non-zero if @v was non-zero, and zero otherwise.
  */
-static __inline__ long atomic64_inc_not_zero(atomic64_t *v)
+static __inline__ int atomic64_inc_not_zero(atomic64_t *v)
 {
        long t1, t2;
 
 {
        long t1, t2;
 
@@ -520,7 +520,7 @@ static __inline__ long atomic64_inc_not_zero(atomic64_t *v)
        : "r" (&v->counter)
        : "cc", "xer", "memory");
 
        : "r" (&v->counter)
        : "cc", "xer", "memory");
 
-       return t1;
+       return t1 != 0;
 }
 
 #endif /* __powerpc64__ */
 }
 
 #endif /* __powerpc64__ */