summaryrefslogtreecommitdiff
path: root/arch/parisc/lib/bitops.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-04-01 23:13:17 -0400
committerPaul E. McKenney <paulmck@kernel.org>2024-04-09 22:06:00 -0700
commitd428032b3524e8fc75cf0bcc86b409df8ddf532b (patch)
tree5de0ff2c6e63c7f7e7e4928b4695ea31603375ce /arch/parisc/lib/bitops.c
parentc57e5dccb06decf3cb6c272ab138c033727149b5 (diff)
downloadlwn-d428032b3524e8fc75cf0bcc86b409df8ddf532b.tar.gz
lwn-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/bitops.c')
-rw-r--r--arch/parisc/lib/bitops.c1
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)