diff options
author | Gargi Sharma <gs051095@gmail.com> | 2017-03-12 02:11:37 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 14:46:34 +0100 |
commit | 4d567cef1b573b5b976d55b9106a59b9fe85e532 (patch) | |
tree | 597aca82cac2d6712456898b5611121a24b35573 /drivers/staging/lustre/lnet | |
parent | 2437a9e023fe1df77c053b222762357bb73212e8 (diff) |
staging: lustre: Use min3 macro
Replace comparsions between three expressions using
two min macros with min3 macro. Done using Coccinelle
Script:
@@
expression e1;
expression e2;
expression e3;
@@
(
- min(min(e1, e2), e3)
+ min3(e1, e2, e3)
|
- min(e1, min(e2, e3))
+ min3(e1, e2, e3)
)
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet')
-rw-r--r-- | drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 4a519c442ef8..0db662d6abdd 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -1093,9 +1093,9 @@ kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type, break; } - wrknob = min(min(kiblnd_rd_frag_size(srcrd, srcidx), - kiblnd_rd_frag_size(dstrd, dstidx)), - (__u32)resid); + wrknob = min3(kiblnd_rd_frag_size(srcrd, srcidx), + kiblnd_rd_frag_size(dstrd, dstidx), + (__u32)resid); sge = &tx->tx_sge[tx->tx_nwrq]; sge->addr = kiblnd_rd_frag_addr(srcrd, srcidx); |