lkml.org 
[lkml]   [2022]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ALSA: usb-audio: Use atomic_try_cmpxchg in ep_state_update
On Wed, 13 Jul 2022 17:19:46 +0200,
Uros Bizjak wrote:
>
> 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: Uros Bizjak <ubizjak@gmail.com>
> Cc: Takashi Iwai <tiwai@suse.de>

Thanks, applied.


Takashi

\
 
 \ /
  Last update: 2022-07-14 10:50    [W:0.055 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site