OSDN Git Service

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)
commit7dfc6971243430dd9edef3c4c0694d3a97b321f7
tree7c269003f170c6f614383c7f9ec0eb4546caf8ae
parent427fda4e5c3406fcca5ab87aabccdbb2840b7544
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