mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
cbf330b94e
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> |
||
---|---|---|
.. | ||
hdpuftrs | ||
ibmasm | ||
sgi-gru | ||
sgi-xp | ||
acer-wmi.c | ||
asus-laptop.c | ||
atmel_pwm.c | ||
atmel_tclib.c | ||
atmel-ssc.c | ||
compal-laptop.c | ||
eeepc-laptop.c | ||
eeprom_93cx6.c | ||
enclosure.c | ||
fujitsu-laptop.c | ||
hp-wmi.c | ||
hpilo.c | ||
hpilo.h | ||
intel_menlow.c | ||
ioc4.c | ||
Kconfig | ||
kgdbts.c | ||
lkdtm.c | ||
Makefile | ||
msi-laptop.c | ||
phantom.c | ||
sony-laptop.c | ||
tc1100-wmi.c | ||
thinkpad_acpi.c | ||
tifm_7xx1.c | ||
tifm_core.c |