OSDN Git Service

staging: most: hdm-usb: Use macro DIV_ROUND_UP
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Mon, 22 Feb 2016 12:27:42 +0000 (17:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Feb 2016 06:35:10 +0000 (22:35 -0800)
commitdce57aef61ae49edf45df6fc09609e8da9b57265
tree89f46efac622be7bf24616be0aa4839ce09ab42b
parent3e8b9fe0602a25e37806e7b92408970da460b0e2
staging: most: hdm-usb: Use 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)
)

The macro CEILING was dropped altogether and has been replaced with
DIV_ROUND_UP.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c