Skip to content
Snippets Groups Projects
Commit 89422df9 authored by Uros Bizjak's avatar Uros Bizjak Committed by Takashi Iwai
Browse files

ALSA: usb-audio: Use atomic_try_cmpxchg in ep_state_update


Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in
ep_state_update. x86 CMPXCHG instruction returns success in ZF flag,
so this change saves a compare after cmpxchg (and related move instruction
in front of cmpxchg).

No functional change intended.

Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20220713151946.4743-1-ubizjak@gmail.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 281dee67
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment