diff options
author | Heiko Carstens <[email protected]> | 2021-04-13 11:23:30 +0200 |
---|---|---|
committer | Heiko Carstens <[email protected]> | 2021-04-15 17:47:41 +0200 |
commit | 13525f0a62cc258b2b2266478cc5fec0a45d1e71 (patch) | |
tree | 1b2356d157dd983e5d457bd6c53cb5431cf50ae4 /scripts/bpf_doc.py | |
parent | 9d42a4d3e27db3cabad82483ed876d4c8b8bed65 (diff) |
s390/cmpxchg: use unsigned long values instead of void pointers
gcc and clang warn about incompatible pointer types due to the recent
cmpxchg changes:
drivers/gpu/drm/drm_lock.c:75:10: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
prev = cmpxchg(lock, old, new);
^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/atomic-instrumented.h:1685:2: note: expanded from macro 'cmpxchg'
arch_cmpxchg(__ai_ptr, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To avoid this simply cast pointers to unsigned long and use them
instead of void pointers. This allows to stay with functions, instead
of using complex defines and having to deal with all their potential
side effects.
Reported-by: kernel test robot <[email protected]>
Fixes: d2b1f6d2d350 ("s390/cmpxchg: get rid of gcc atomic builtins")
Link: https://lore.kernel.org/linux-s390/[email protected]/
Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions