diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-01 21:58:50 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2024-04-09 22:06:00 -0700 |
commit | 2f528020a29021a9e5da1b85488993e8d9808a38 (patch) | |
tree | 52b0fdaf341aa735b39fa9158356d68e5e927e85 /arch/sparc/lib | |
parent | 39cd87c4eb2b893354f3b850f916353f2658ae6f (diff) | |
download | lwn-2f528020a29021a9e5da1b85488993e8d9808a38.tar.gz lwn-2f528020a29021a9e5da1b85488993e8d9808a38.zip |
sparc32: make __cmpxchg_u32() return u32
Conversion between u32 and unsigned long is tautological there,
and the only use of return value is to return it from
__cmpxchg() (which return unsigned long).
Get rid of explicit casts in __cmpxchg_u32() call, while we are
at it - normal conversions for arguments will do just fine.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'arch/sparc/lib')
-rw-r--r-- | arch/sparc/lib/atomic32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index cf80d1ae352b..d90d756123d8 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c @@ -159,7 +159,7 @@ unsigned long sp32___change_bit(unsigned long *addr, unsigned long mask) } EXPORT_SYMBOL(sp32___change_bit); -unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) +u32 __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) { unsigned long flags; u32 prev; @@ -169,7 +169,7 @@ unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) *ptr = new; spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); - return (unsigned long)prev; + return prev; } EXPORT_SYMBOL(__cmpxchg_u32); |