diff options
| author | 2016-02-19 20:57:15 +0530 | |
|---|---|---|
| committer | 2016-02-20 15:25:58 -0800 | |
| commit | 2ead7b32aadc83833d7cf6e9751ef56b89e90462 (patch) | |
| tree | df9720f1dc9dfe3609b5644afed33b1358b8fa4d /tools/perf/scripts/python/syscall-counts.py | |
| parent | staging: comedi: drivers: Remove unnecessary else following return (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>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
