diff options
author | 2025-02-28 15:11:03 +0100 | |
---|---|---|
committer | 2025-03-04 17:34:04 +0100 | |
commit | 08d95a12cd28009c2b4673f5f2e2cf65bc8d3402 (patch) | |
tree | 1c20e2310c9f56819a6c8a2cfeed0985e34aa03a | |
parent | s390/traps: Change stack overflow message (diff) | |
download | wireguard-linux-08d95a12cd28009c2b4673f5f2e2cf65bc8d3402.tar.xz wireguard-linux-08d95a12cd28009c2b4673f5f2e2cf65bc8d3402.zip |
s390/atomic_ops: Let __atomic_add_const() variants always return void
Depending on MARCH_HAS_Z196_FEATURES __atomic_add_const() returns void or
the previous value before the atomic variant. Make sure that for both cases
void is returned so potential incorrect usage results in both cases in a
compile error.
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r-- | arch/s390/include/asm/atomic_ops.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/include/asm/atomic_ops.h b/arch/s390/include/asm/atomic_ops.h index 585678bbcd7a..21c26d842832 100644 --- a/arch/s390/include/asm/atomic_ops.h +++ b/arch/s390/include/asm/atomic_ops.h @@ -163,10 +163,10 @@ __ATOMIC64_OPS(__atomic64_xor, "xgr") #undef __ATOMIC64_OPS -#define __atomic_add_const(val, ptr) __atomic_add(val, ptr) -#define __atomic_add_const_barrier(val, ptr) __atomic_add(val, ptr) -#define __atomic64_add_const(val, ptr) __atomic64_add(val, ptr) -#define __atomic64_add_const_barrier(val, ptr) __atomic64_add(val, ptr) +#define __atomic_add_const(val, ptr) ((void)__atomic_add(val, ptr)) +#define __atomic_add_const_barrier(val, ptr) ((void)__atomic_add(val, ptr)) +#define __atomic64_add_const(val, ptr) ((void)__atomic64_add(val, ptr)) +#define __atomic64_add_const_barrier(val, ptr) ((void)__atomic64_add(val, ptr)) #endif /* MARCH_HAS_Z196_FEATURES */ |