commit | 2ead7b32aadc83833d7cf6e9751ef56b89e90462 | [log] [tgz] |
---|---|---|
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | Fri Feb 19 20:57:15 2016 +0530 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Sat Feb 20 15:25:58 2016 -0800 |
tree | df9720f1dc9dfe3609b5644afed33b1358b8fa4d | |
parent | b7c57dd54a4531eccb94688907f9b14bcad12c18 [diff] |
staging: comedi: drivers: Use DIV_ROUND_CLOSEST The kernel.h macro DIV_ROUND_CLOSEST performs the computation `(x +d/2)/d` but is perhaps more readable. The Coccinelle script used is as follows: // <smpl> @@ expression x,__divisor; @@ - (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>