linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hexagon: make arch_spin_trylock() return signed int
@ 2024-12-19  8:34 Rolf Eike Beer
  0 siblings, 0 replies; only message in thread
From: Rolf Eike Beer @ 2024-12-19  8:34 UTC (permalink / raw)
  To: Brian Cain
  Cc: Peter Zijlstra, Will Deacon, Waiman Long, Boqun Feng,
	linux-kernel, linux-hexagon

In contrast to all other architectures this was using an unsigned int while the
variable used to hold the return value inside the function is signed as well.

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
---
Not tested in any way, but what could possibly go wrong when fiddling with low
level locking? ;)

 arch/hexagon/include/asm/spinlock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/hexagon/include/asm/spinlock.h b/arch/hexagon/include/asm/spinlock.h
index ef103b73bec8..4394b660a12d 100644
--- a/arch/hexagon/include/asm/spinlock.h
+++ b/arch/hexagon/include/asm/spinlock.h
@@ -133,7 +133,7 @@ static inline void arch_spin_unlock(arch_spinlock_t *lock)
 	lock->lock = 0;
 }
 
-static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock)
+static inline int arch_spin_trylock(arch_spinlock_t *lock)
 {
 	int temp;
 	__asm__ __volatile__(
-- 
2.47.1


-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail info@emlix.com
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
http://www.emlix.com

emlix - your embedded Linux partner



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-19  8:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19  8:34 [PATCH] hexagon: make arch_spin_trylock() return signed int Rolf Eike Beer

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).