]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: ni_pcidio.c: Prefer using macro DIV_ROUND_UP
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Wed, 9 Mar 2016 19:04:44 +0000 (00:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2016 03:34:22 +0000 (19:34 -0800)
commitb44483e7be1a713ed1f522696dc48909487fa794
tree511dfad945ad04dbe0b7974f9a4e0776b0b052d4
parent621ab40df94c00e197bb06d9b853dce9a47139c6
staging: comedi: ni_pcidio.c: Prefer using macro DIV_ROUND_UP

The macro DIV_ROUND_UP performs the computation
(((n) + (d) - 1) /(d)). It clarifies the divisor calculations.
This was done 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: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_pcidio.c