diff options
author | Julia Lawall <julia@diku.dk> | 2008-10-16 07:05:23 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 20:21:52 +0200 |
commit | 435263702ef0fc9ffdc6301a71c03b1d9ac0f1e0 (patch) | |
tree | 43a0b94a415559b55a60cadecf04d819f2c9285c /arch/arm/mach-s3c2412/dma.c | |
parent | make kprobes.c:kretprobe_table_lock() static (diff) | |
download | linux-435263702ef0fc9ffdc6301a71c03b1d9ac0f1e0.tar.xz linux-435263702ef0fc9ffdc6301a71c03b1d9ac0f1e0.zip |
drivers/net/xen-netfront.c: Use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.
An extract of 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 n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-s3c2412/dma.c')
0 files changed, 0 insertions, 0 deletions