Skip to contentSkip to conversation

hexagon: make arch_spin_trylock() return signed int

PATCH New Rolf Eike Beer 1 participant 1 message Dec 19, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hexagon: make arch_spin_trylock() return signed int

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.

---
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(-)
arch/hexagon/include/asm/spinlock.h +1 -1
index ef103b73bec8..4394b660a12d 100644
@@ -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__(
Signature · 17 lines
2.47.1


-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail [email protected]
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