android_kernel_motorola_sm6225/drivers/ide/arm
Julia Lawall 00fe8b7ac2 ide: 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>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26 17:36:35 +02:00
..
bast-ide.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
icside.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
ide_arm.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
Makefile Palmchip BK3710 IDE driver 2008-02-06 02:57:48 +01:00
palm_bk3710.c ide: use DIV_ROUND_UP 2008-04-26 17:36:35 +02:00
rapide.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00