]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: use swap() macro instead of taking tmp variable
authorGuo Zhengkui <guozhengkui@vivo.com>
Tue, 12 Apr 2022 06:46:20 +0000 (14:46 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2022 18:45:13 +0000 (20:45 +0200)
commitdbf63729a7c7abe3e31cea1fcc45a2ee6d22cfa1
treeda3d16d9aee9562df180697757e4674a7ebce1ce
parent504ad3b521b293afa9003191b97c7033ec5db610
libceph: use swap() macro instead of taking tmp variable

Fix the following coccicheck warning:
net/ceph/crush/mapper.c:1077:8-9: WARNING opportunity for swap()

by using swap() for the swapping of variable values and drop
the tmp variable that is not needed any more.

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/crush/mapper.c