linux/drivers
Julia Lawall dfa5ec79d2 USB: 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
..
acorn/char
acpi
amba
ata
atm
auxdisplay
base
block
bluetooth
cdrom
char Blackfin char driver for Blackfin on-chip OTP memory (v3) 2008-04-25 08:04:56 +08:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma
edac
eisa
firewire
firmware
gpio
hid
hwmon
i2c
ide
ieee1394
infiniband
input
isdn
leds
lguest
macintosh
mca
md
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2008-04-24 11:21:08 -07:00
memstick
message
mfd Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-04-24 08:36:11 -07:00
misc
mmc
mtd
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 2008-04-24 09:33:34 -07:00
nubus
of
oprofile
parisc
parport
pci intel-iommu.c: dma ops fix 2008-04-24 23:15:43 +02:00
pcmcia
pnp
power
ps3
rapidio
rtc
s390
sbus
scsi
serial Blackfin Serial Driver: fix bug - use mod_timer to replace only add_timer. 2008-04-25 04:36:47 +08:00
sh
sn
spi
ssb
tc
telephony
thermal
uio
usb USB: use DIV_ROUND_UP 2008-04-24 21:16:39 -07:00
video
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile