]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
staging: comedi: drivers: ni_mio_common: Prefer using macro DIV_ROUND_UP
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Wed, 9 Mar 2016 18:35:16 +0000 (00:05 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2016 03:34:22 +0000 (19:34 -0800)
commit7f9d2b1ce5f01e76a26ca9dd087c87fd47cb0cfd
tree2307a5bfc2b32b552f056efe1e1d4d591373cfeb
parentdf6ba4f16170838482319f40ce1a2b280b9e80f3
staging: comedi: drivers: ni_mio_common: 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_mio_common.c