]> git.baikalelectronics.ru Git - kernel.git/commit
staging: most: Using macro DIV_ROUND_UP
authorsimran singhal <singhalsimran0@gmail.com>
Wed, 22 Feb 2017 09:10:15 +0000 (14:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:02 +0000 (09:17 +0100)
commit02ecc3758e66fe1014c5e383edc790f881a423b6
tree2c38eba1910dc9535d91dc5c3919316ae27268fb
parent5e2824ab383e0c6167eb87e51fa5e86bf0e2437c
staging: most: 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/most/hdm-dim2/dim2_hal.c