void *rcu_set_pointer_sym_bp(void **p, void *v)
{
cmm_wmb();
- return uatomic_set(p, v);
+ uatomic_set(p, v);
+ return v;
}
void *rcu_xchg_pointer_sym_bp(void **p, void *v)
void *rcu_set_pointer_sym(void **p, void *v)
{
cmm_wmb();
- return uatomic_set(p, v);
+ uatomic_set(p, v);
+ return v;
}
void *rcu_xchg_pointer_sym(void **p, void *v)
};
#define __hp(x) ((struct __uatomic_dummy *)(x))
-#define _uatomic_set(addr, v) CMM_STORE_SHARED(*(addr), (v))
+#define _uatomic_set(addr, v) ((void) CMM_STORE_SHARED(*(addr), (v)))
/* cmpxchg */
: (compat_uatomic_##insn)) \
: (compat_uatomic_##insn))))
+/*
+ * We leave the return value so we don't break the ABI, but remove the
+ * return value from the API.
+ */
extern unsigned long _compat_uatomic_set(void *addr,
unsigned long _new, int len);
#define compat_uatomic_set(addr, _new) \
- ((__typeof__(*(addr))) _compat_uatomic_set((addr), \
- caa_cast_long_keep_sign(_new), \
- sizeof(*(addr))))
+ ((void) _compat_uatomic_set((addr), \
+ caa_cast_long_keep_sign(_new), \
+ sizeof(*(addr))))
extern unsigned long _compat_uatomic_xchg(void *addr,