atomic: Avoid casting the return value of atomic_load_ptr to void *

Otherwise a cast is needed to load a uintptr_t value.

Fixes:	e1f4d62377 ("rangelocks: remove unneeded cast of the atomic_load_ptr() result")
MFC after:	1 week
This commit is contained in:
Mark Johnston 2024-08-28 18:51:06 +00:00
parent 1e584ca30e
commit c7a7e997d2

View file

@ -266,7 +266,8 @@ ATOMIC_SAN_THREAD_FENCE(SAN_INTERCEPTOR_PREFIX);
#define atomic_fcmpset_rel_ptr ATOMIC_SAN(fcmpset_rel_ptr)
#define atomic_fetchadd_ptr ATOMIC_SAN(fetchadd_ptr)
#define atomic_load_ptr(x) \
((void *)ATOMIC_SAN(load_ptr)(__DECONST(volatile uintptr_t *, (x))))
((__typeof(*x))ATOMIC_SAN(load_ptr)( \
__DECONST(volatile uintptr_t *, (x))))
#define atomic_load_acq_ptr ATOMIC_SAN(load_acq_ptr)
#define atomic_load_consume_ptr(x) \
((void *)atomic_load_acq_ptr((volatile uintptr_t *)(x)))