]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commit4d2a71d02b5c36190ce90455095b0ff003f117ca
tree5c51e478003a6e088954cbf22764d1b505a270a7
parentcb77659272af51e80099c93b0e65abbf43bdaad5
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