Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1e5a05d5 authored by Bhaktipriya Shridhar's avatar Bhaktipriya Shridhar Committed by Greg Kroah-Hartman
Browse files

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: default avatarBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5ee5ae02
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment