diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-02 05:13:17 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2024-04-10 07:06:00 +0200 |
commit | d428032b3524e8fc75cf0bcc86b409df8ddf532b (patch) | |
tree | 5de0ff2c6e63c7f7e7e4928b4695ea31603375ce /arch/parisc/lib | |
parent | parisc: add missing export of __cmpxchg_u8() (diff) | |
download | linux-d428032b3524e8fc75cf0bcc86b409df8ddf532b.tar.xz linux-d428032b3524e8fc75cf0bcc86b409df8ddf532b.zip |
parisc: add u16 support to cmpxchg()
Add (and export) __cmpxchg_u16(), teach __cmpxchg() to use it.
And get rid of manual truncation down to u8, etc. in there - the
only reason for those is to avoid bogus warnings about constant
truncation from sparse, and those are easy to avoid by turning
that switch into conditional expression.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'arch/parisc/lib')
-rw-r--r-- | arch/parisc/lib/bitops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c index cae30a3eb6d9..9df810050642 100644 --- a/arch/parisc/lib/bitops.c +++ b/arch/parisc/lib/bitops.c @@ -71,4 +71,5 @@ unsigned long notrace __xchg8(char x, volatile char *ptr) CMPXCHG(u64) CMPXCHG(u32) +CMPXCHG(u16) CMPXCHG(u8) |