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>
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);