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
..
2008-04-25 01:26:28 -04:00
2008-04-21 22:38:45 +00:00
2008-04-26 17:36:35 +02:00
2008-04-25 00:06:52 +01:00
2008-04-19 20:40:10 -04:00
2008-04-24 23:15:43 +02:00
2008-04-23 21:25:35 -04:00
2008-04-07 13:14:22 -07:00
2008-04-24 23:57:33 +02:00
2008-04-24 23:57:33 +02:00