]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: libcfs: Use swap() in cfs_hash_bd_order()
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Tue, 23 Feb 2016 21:42:47 +0000 (03:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Feb 2016 06:18:11 +0000 (22:18 -0800)
commit63ded6c863cf7802c9b45469211cc800454fdef0
tree5c51e478003a6e088954cbf22764d1b505a270a7
parentacebbb8cc411c0f16630f920aaf6c40eec2713b0
staging: lustre: libcfs: Use swap() in cfs_hash_bd_order()

Use swap() function instead of using a temporary variable for swapping
two variables.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
type T;
T a,b,c;
@@
- a = b;
- b = c;
- c = a;
+ swap(b, c);
//<smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/hash.c