linux/drivers/misc/sgi-gru
Julia Lawall cbf330b94e drivers/misc: 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>
Cc: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 11:21:30 -07:00
..
gru_instructions.h GRU Driver V3: fixes to resolve code review comments 2008-07-30 09:41:48 -07:00
gru.h GRU Driver: driver internal header files 2008-07-30 09:41:47 -07:00
grufault.c GRU Driver: page faults & exceptions 2008-07-30 09:41:48 -07:00
grufile.c ia64: fix panic during `modprobe -r xpc' 2008-09-13 14:41:52 -07:00
gruhandles.h GRU Driver: hardware data structures 2008-07-30 09:41:47 -07:00
grukservices.c drivers/misc: Use DIV_ROUND_UP 2008-10-16 11:21:30 -07:00
grukservices.h GRU Driver: kernel services header files 2008-07-30 09:41:47 -07:00
grulib.h GRU Driver: driver internal header files 2008-07-30 09:41:47 -07:00
grumain.c GRU Driver V3: fixes to resolve code review comments 2008-07-30 09:41:48 -07:00
gruprocfs.c GRU Driver V3: fixes to resolve code review comments 2008-07-30 09:41:48 -07:00
grutables.h GRU: fix preprocessor symbol for sparse 2008-08-12 16:07:29 -07:00
grutlbpurge.c drivers/misc/sgi-gru/grutlbpurge.c: removed duplicated #include 2008-08-05 14:33:49 -07:00
Makefile GRU Driver: driver makefile 2008-07-30 09:41:48 -07:00