mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
dfa5ec79d2
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> |
||
---|---|---|
.. | ||
sisusbvga | ||
adutux.c | ||
appledisplay.c | ||
auerswald.c | ||
berry_charge.c | ||
cypress_cy7c63.c | ||
cytherm.c | ||
emi26_fw.h | ||
emi26.c | ||
emi62_fw_m.h | ||
emi62_fw_s.h | ||
emi62.c | ||
ftdi-elan.c | ||
idmouse.c | ||
iowarrior.c | ||
Kconfig | ||
ldusb.c | ||
legousbtower.c | ||
Makefile | ||
phidget.c | ||
phidget.h | ||
phidgetkit.c | ||
phidgetmotorcontrol.c | ||
phidgetservo.c | ||
rio500_usb.h | ||
rio500.c | ||
trancevibrator.c | ||
usb_u132.h | ||
usblcd.c | ||
usbled.c | ||
usbtest.c | ||
uss720.c |