From 022a1692444cd683ef42f637cc717db4d8fd9378 Mon Sep 17 00:00:00 2001 From: Milind Arun Choudhary Date: Tue, 8 May 2007 00:29:02 -0700 Subject: ROUND_UP macro cleanup in fs/(select|compat|readdir).c ROUND_UP macro cleanup use,ALIGN or DIV_ROUND_UP where ever appropriate. Signed-off-by: Milind Arun Choudhary Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/select.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/select.c') diff --git a/fs/select.c b/fs/select.c index f163db20eb5..d86224154de 100644 --- a/fs/select.c +++ b/fs/select.c @@ -14,6 +14,7 @@ * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian). */ +#include #include #include #include @@ -25,7 +26,6 @@ #include -#define ROUND_UP(x,y) (((x)+(y)-1)/(y)) #define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) struct poll_table_page { @@ -398,7 +398,7 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, if ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS) timeout = -1; /* infinite */ else { - timeout = ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ); + timeout = DIV_ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ); timeout += tv.tv_sec * HZ; } } @@ -453,7 +453,7 @@ asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS) timeout = -1; /* infinite */ else { - timeout = ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ); + timeout = DIV_ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ); timeout += ts.tv_sec * HZ; } } @@ -775,7 +775,7 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS) timeout = -1; /* infinite */ else { - timeout = ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ); + timeout = DIV_ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ); timeout += ts.tv_sec * HZ; } } -- cgit v1.2.3