stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.10.y] MIPS: locking/atomic: Fix atomic{_64,}_sub_if_positive
@ 2023-06-10 19:00 Guenter Roeck
  2023-06-12  9:25 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2023-06-10 19:00 UTC (permalink / raw)
  To: stable; +Cc: Greg Kroah-Hartman, Rui Wang, Thomas Bogendoerfer, Guenter Roeck

From: Rui Wang <wangrui@loongson.cn>

commit cb95ea79b3fc772c5873a7a4532ab4c14a455da2 upstream.

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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
I recently enabled atomic CONFIG_ATOMIC64_SELFTEST, which results in
a crash when testing 64-bit little endian mips images in v5.10.y.
This patch fixes the problem.

 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 27ad76791539..fd0e09033a7c 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -203,7 +203,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 pfx##_sub_if_positive(type i, pfx##_t * v)	\
+static __inline__ type pfx##_sub_if_positive(type i, pfx##_t * v)	\
 {									\
 	type temp, result;						\
 									\
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 5.10.y] MIPS: locking/atomic: Fix atomic{_64,}_sub_if_positive
  2023-06-10 19:00 [PATCH 5.10.y] MIPS: locking/atomic: Fix atomic{_64,}_sub_if_positive Guenter Roeck
@ 2023-06-12  9:25 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-06-12  9:25 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: stable, Rui Wang, Thomas Bogendoerfer

On Sat, Jun 10, 2023 at 12:00:19PM -0700, Guenter Roeck wrote:
> From: Rui Wang <wangrui@loongson.cn>
> 
> commit cb95ea79b3fc772c5873a7a4532ab4c14a455da2 upstream.
> 
> 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>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> I recently enabled atomic CONFIG_ATOMIC64_SELFTEST, which results in
> a crash when testing 64-bit little endian mips images in v5.10.y.
> This patch fixes the problem.
> 
>  arch/mips/include/asm/atomic.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-12  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-10 19:00 [PATCH 5.10.y] MIPS: locking/atomic: Fix atomic{_64,}_sub_if_positive Guenter Roeck
2023-06-12  9:25 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).