OSDN Git Service

MIPS: locking/atomic: Fix atomic{_64,}_sub_if_positive
authorRui Wang <wangrui@loongson.cn>
Thu, 29 Jul 2021 09:31:52 +0000 (17:31 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 5 Aug 2021 09:01:18 +0000 (11:01 +0200)
This looks like a typo and that caused atomic64 test failed.

Signed-off-by: Rui Wang <wangrui@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/atomic.h

index 95e1f7f..a0b9e7c 100644 (file)
@@ -206,7 +206,7 @@ ATOMIC_OPS(atomic64, xor, s64, ^=, xor, lld, scd)
  * The function returns the old value of @v minus @i.
  */
 #define ATOMIC_SIP_OP(pfx, type, op, ll, sc)                           \
-static __inline__ int arch_##pfx##_sub_if_positive(type i, pfx##_t * v)        \
+static __inline__ type arch_##pfx##_sub_if_positive(type i, pfx##_t * v)       \
 {                                                                      \
        type temp, result;                                              \
                                                                        \