linux/drivers/ide
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
..
arm ide: use DIV_ROUND_UP 2008-04-26 17:36:35 +02:00
cris ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
h8300 ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
legacy qd65xx: return error value in qd_probe() 2008-04-26 17:36:35 +02:00
mips au1xxx-ide: use ide_find_port() 2008-04-26 17:36:33 +02:00
pci ide: use DIV_ROUND_UP 2008-04-26 17:36:35 +02:00
ppc ide-pmac: use ide_find_port() 2008-04-26 17:36:33 +02:00
ide-acpi.c ide-acpi: add missing drive->acpidata zeroing 2008-04-18 00:46:21 +02:00
ide-cd_ioctl.c ide-cd: mark REQ_TYPE_ATA_PC write requests with REQ_RW flag 2008-03-07 21:53:49 +01:00
ide-cd_verbose.c ide-cd: move VERBOSE_IDE_CD_ERRORS code to ide-cd_verbose.c 2008-02-01 23:09:23 +01:00
ide-cd.c cdrom: make unregister_cdrom() return void 2008-04-21 09:50:08 +02:00
ide-cd.h ide: delete filenames/versions from comments 2008-02-01 23:09:33 +01:00
ide-disk.c ide-disk: add missing printk() KERN_* levels 2008-02-26 21:50:36 +01:00
ide-dma.c ide: fix enabling DMA on it821x in "smart" mode 2008-03-07 21:53:49 +01:00
ide-floppy.c ide: use generic ATAPI packet command flags in ide-{floppy,tape} 2008-04-18 00:46:27 +02:00
ide-generic.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
ide-io.c ide: remove IDE_*_REG macros 2008-04-18 00:46:26 +02:00
ide-iops.c ide: remove IDE_*_REG macros 2008-04-18 00:46:26 +02:00
ide-lib.c ide: remove commented out entries from ide_pio_blacklist[] 2008-03-22 16:40:20 +01:00
ide-pnp.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
ide-probe.c ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2) 2008-04-18 00:46:33 +02:00
ide-proc.c ide: remove obsoleted "idex=base[,ctl[,irq]]" kernel parameters (take 2) 2008-04-18 00:46:24 +02:00
ide-scan-pci.c IDE: remove ide=reverse IDE core 2008-04-18 00:46:20 +02:00
ide-tape.c ide: use generic ATAPI packet command flags in ide-{floppy,tape} 2008-04-18 00:46:27 +02:00
ide-taskfile.c ide: remove IDE_*_REG macros 2008-04-18 00:46:26 +02:00
ide-timing.h Spelling fixes: lenght->length 2008-02-03 15:42:53 +02:00
ide.c ide: cleanup ide_find_port() 2008-04-26 17:36:32 +02:00
Kconfig ide/Kconfig: BLK_DEV_4DRIVES should be a tristate 2008-04-26 17:36:31 +02:00
Makefile ide: fix ide_find_port() 2008-04-18 00:46:21 +02:00
setup-pci.c ide: IDE_HFLAG_BOOTABLE -> IDE_HFLAG_NON_BOOTABLE 2008-04-26 17:36:35 +02:00