diff options
author | Julia Lawall <julia@diku.dk> | 2009-08-01 11:51:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-02 21:54:18 +0200 |
commit | 39506a552b4b302540e1f9c6c93a122df353e57d (patch) | |
tree | b25df408d8a8fab89be66bca848d8b53d277bdb5 /drivers/atm/horizon.c | |
parent | cxgb3: fix Gen2 pci default settings (diff) | |
download | linux-39506a552b4b302540e1f9c6c93a122df353e57d.tar.xz linux-39506a552b4b302540e1f9c6c93a122df353e57d.zip |
drivers/net: 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@
@@
#include <linux/kernel.h>
@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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/horizon.c')
0 files changed, 0 insertions, 0 deletions