staging: lustre: Using macro DIV_ROUND_UP
authorsimran singhal <singhalsimran0@gmail.com>
Wed, 22 Feb 2017 09:32:04 +0000 (15:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:00 +0000 (09:17 +0100)
commitfce3444aeae22edc2bb6100888be8039a6e9bb5b
treef3c7013b67c950bd888d813e32096da4d1fce346
parent2720ecceb73c9acd66a5644c3de335467d33f49f
staging: lustre: Using macro DIV_ROUND_UP

The macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /(d)).
It clarifies the divisor calculations. This occurence was detected using
the coccinelle script:

@@
expression e1;
expression e2;
@@
(
- ((e1) + e2 - 1) / (e2)
+ DIV_ROUND_UP(e1,e2)
|
- ((e1) + (e2 - 1)) / (e2)
+ DIV_ROUND_UP(e1,e2)
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/selftest/conrpc.c
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/niobuf.c
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c