aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.c
diff options
context:
space:
mode:
authorUros Bizjak <[email protected]>2022-08-22 14:32:43 +0000
committerJakub Kicinski <[email protected]>2022-08-25 21:20:35 +0000
commitb9030780971b56c0c455c3b66244efd96608846d (patch)
tree59874de2ee8d35ea7645e97fa02b878a68febf6e /net/bluetooth/hci_request.c
parentMerge branch 'mlxsw-remove-some-unused-code' (diff)
downloadkernel-b9030780971b56c0c455c3b66244efd96608846d.tar.gz
kernel-b9030780971b56c0c455c3b66244efd96608846d.zip
netdev: Use try_cmpxchg in napi_if_scheduled_mark_missed
Use try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in napi_if_scheduled_mark_missed. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications. Cc: Eric Dumazet <[email protected]> Cc: Paolo Abeni <[email protected]> Signed-off-by: Uros Bizjak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/bluetooth/hci_request.c')
0 files changed, 0 insertions, 0 deletions