]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
staging: comedi: Use macro DIV_ROUND_CLOSEST
Occurences of the computation (x +d/2)/d can be replaced with
the macro DIV_ROUND_CLOSEST.
This was detected by the following Coccinelle script.
@@
expression e1,e2;
@@
(
- ((e1) + e2/2) / (e2)
+ DIV_ROUND_CLOSEST(e1,e2)
|
- ((e1) + (e2/2)) / (e2)
+ DIV_ROUND_CLOSEST(e1,e2)
)
Since some lines exceeded the 80 character limit,
some changes were made by hand.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>