diff options
author | Julia Lawall <julia@diku.dk> | 2009-08-02 10:47:27 +0200 |
---|---|---|
committer | Hirokazu Takata <takata@linux-m32r.org> | 2009-11-04 08:31:50 +0900 |
commit | 560235857fb79da48d36e8f866a0ee3b10a232bf (patch) | |
tree | 5635f5ec3fca87f35caf0ef0bff7fdbc21782ff1 /firmware/matrox | |
parent | b419148e567728f6af0c3b01965c1cc141e3e13a (diff) |
arch/m32r: Use DIV_ROUND_CLOSEST
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Diffstat (limited to 'firmware/matrox')
0 files changed, 0 insertions, 0 deletions