[PATCH] hexagon: make arch_spin_trylock() return signed int

Rolf Eike Beer posted 1 patch 12 months ago
arch/hexagon/include/asm/spinlock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hexagon: make arch_spin_trylock() return signed int
Posted by Rolf Eike Beer 12 months ago
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