[PATCH AUTOSEL 5.14 35/99] MIPS: locking/atomic: Fix atomic{_64,}_sub_if_positive

From: Sasha Levin
Date: Thu Sep 09 2021 - 20:41:52 EST


From: Rui Wang <wangrui@xxxxxxxxxxx>

[ Upstream commit cb95ea79b3fc772c5873a7a4532ab4c14a455da2 ]

This looks like a typo and that caused atomic64 test failed.

Signed-off-by: Rui Wang <wangrui@xxxxxxxxxxx>
Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
arch/mips/include/asm/atomic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
index 95e1f7f3597f..a0b9e7c1e4fc 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -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; \
\
--
2.30.2