aboutsummaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorMilind Arun Choudhary <milindchoudhary@gmail.com>2007-05-08 03:29:02 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:09 -0400
commit022a1692444cd683ef42f637cc717db4d8fd9378 (patch)
tree82d8c1360921310f90b81c147b345afad98317f7 /fs/select.c
parent10f8a59813ee8bb41fb1d72ed2ec12a1c9f66da2 (diff)
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 <milindchoudhary@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/select.c b/fs/select.c
index f163db20eb5a..d86224154dec 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -14,6 +14,7 @@
14 * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian). 14 * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
15 */ 15 */
16 16
17#include <linux/kernel.h>
17#include <linux/syscalls.h> 18#include <linux/syscalls.h>
18#include <linux/module.h> 19#include <linux/module.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
@@ -25,7 +26,6 @@
25 26
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27 28
28#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
29#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) 29#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
30 30
31struct poll_table_page { 31struct poll_table_page {
@@ -398,7 +398,7 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
398 if ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS) 398 if ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS)
399 timeout = -1; /* infinite */ 399 timeout = -1; /* infinite */
400 else { 400 else {
401 timeout = ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ); 401 timeout = DIV_ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ);
402 timeout += tv.tv_sec * HZ; 402 timeout += tv.tv_sec * HZ;
403 } 403 }
404 } 404 }
@@ -453,7 +453,7 @@ asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp,
453 if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS) 453 if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS)
454 timeout = -1; /* infinite */ 454 timeout = -1; /* infinite */
455 else { 455 else {
456 timeout = ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ); 456 timeout = DIV_ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ);
457 timeout += ts.tv_sec * HZ; 457 timeout += ts.tv_sec * HZ;
458 } 458 }
459 } 459 }
@@ -775,7 +775,7 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
775 if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS) 775 if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS)
776 timeout = -1; /* infinite */ 776 timeout = -1; /* infinite */
777 else { 777 else {
778 timeout = ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ); 778 timeout = DIV_ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ);
779 timeout += ts.tv_sec * HZ; 779 timeout += ts.tv_sec * HZ;
780 } 780 }
781 } 781 }