diff options
| author | 2022-07-04 14:14:04 +0200 | |
|---|---|---|
| committer | 2022-07-04 14:14:04 +0200 | |
| commit | dd84cfff3cc3b79c9d616f85bd1178df135cbd1a (patch) | |
| tree | cd02e30a78211bed4f1270877b705a079d4bd364 /lib/lockref.c | |
| parent | ALSA: usb-audio: Add quirk for Fiero SC-01 (fw v1.0.0) (diff) | |
| parent | ASoC: madera: Fix event generation for rate controls (diff) | |
| download | wireguard-linux-dd84cfff3cc3b79c9d616f85bd1178df135cbd1a.tar.xz wireguard-linux-dd84cfff3cc3b79c9d616f85bd1178df135cbd1a.zip | |
Merge tag 'asoc-fix-v5.19-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.19
A collection of fixes for v5.19, quite large but nothing major - a good
chunk of it is more stuff that was identified by mixer-test regarding
event generation.
Diffstat (limited to 'lib/lockref.c')
| -rw-r--r-- | lib/lockref.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/lockref.c b/lib/lockref.c index 5b34bbd3eba8..c6f0b183b937 100644 --- a/lib/lockref.c +++ b/lib/lockref.c @@ -14,12 +14,11 @@ BUILD_BUG_ON(sizeof(old) != 8); \ old.lock_count = READ_ONCE(lockref->lock_count); \ while (likely(arch_spin_value_unlocked(old.lock.rlock.raw_lock))) { \ - struct lockref new = old, prev = old; \ + struct lockref new = old; \ CODE \ - old.lock_count = cmpxchg64_relaxed(&lockref->lock_count, \ - old.lock_count, \ - new.lock_count); \ - if (likely(old.lock_count == prev.lock_count)) { \ + if (likely(try_cmpxchg64_relaxed(&lockref->lock_count, \ + &old.lock_count, \ + new.lock_count))) { \ SUCCESS; \ } \ if (!--retry) \ |
