locking/ww_mutex/test: Use swap() macro
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 31 Jul 2024 13:58:51 +0000 (15:58 +0200)
committerBoqun Feng <boqun.feng@gmail.com>
Sun, 15 Dec 2024 19:49:35 +0000 (11:49 -0800)
commit0d3547df6934b8f9600630322799a2a76b4567d8
treeed59977ed779445ca5513c2bd600a46ff24164ca
parent63a48181fbcddefe5fb4c6618938bb64c543945b
locking/ww_mutex/test: Use swap() macro

Fixes the following Coccinelle/coccicheck warning reported by
swap.cocci:

  WARNING opportunity for swap()

Compile-tested only.

[Boqun: Add the report tags from Jiapeng and Abaci Robot [1].]

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11531
Link: https://lore.kernel.org/r/20241025081455.55089-1-jiapeng.chong@linux.alibaba.com
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20240731135850.81018-2-thorsten.blum@toblux.com
kernel/locking/test-ww_mutex.c