about summary refs log tree commit diff
path: root/arch/riscv64/atomic_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv64/atomic_arch.h')
-rw-r--r--arch/riscv64/atomic_arch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv64/atomic_arch.h b/arch/riscv64/atomic_arch.h
index 41ad4d04..0c382588 100644
--- a/arch/riscv64/atomic_arch.h
+++ b/arch/riscv64/atomic_arch.h
@@ -15,7 +15,7 @@ static inline int a_cas(volatile int *p, int t, int s)
 		"	bnez %1, 1b\n"
 		"1:"
 		: "=&r"(old), "=&r"(tmp)
-		: "r"(p), "r"(t), "r"(s)
+		: "r"(p), "r"((long)t), "r"((long)s)
 		: "memory");
 	return old;
 }