]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: Using macro DIV_ROUND_UP
authorsimran singhal <singhalsimran0@gmail.com>
Tue, 21 Feb 2017 18:28:26 +0000 (23:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:16:58 +0000 (09:16 +0100)
commit82aaf20c07c89f68795373275cabfb0c756407a0
tree7c269003f170c6f614383c7f9ec0eb4546caf8ae
parent017ea71e53449008e3be03ff276b158924a25ac2
staging: comedi: 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/comedi/drivers/addi_apci_3xxx.c
drivers/staging/comedi/drivers/cb_pcidas64.c