Commit 4d567cef authored by Gargi Sharma's avatar Gargi Sharma Committed by Greg Kroah-Hartman

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: default avatarGargi Sharma <gs051095@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2437a9e0
...@@ -1093,8 +1093,8 @@ kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type, ...@@ -1093,8 +1093,8 @@ kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type,
break; break;
} }
wrknob = min(min(kiblnd_rd_frag_size(srcrd, srcidx), wrknob = min3(kiblnd_rd_frag_size(srcrd, srcidx),
kiblnd_rd_frag_size(dstrd, dstidx)), kiblnd_rd_frag_size(dstrd, dstidx),
(__u32)resid); (__u32)resid);
sge = &tx->tx_sge[tx->tx_nwrq]; sge = &tx->tx_sge[tx->tx_nwrq];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment