From: David Woodhouse > fs/compat.c: In function `compat_sys_ppoll': > fs/compat.c:1892: warning: comparison is always true due to limited > range of data type > > ts.tv_sec is compat_time_t which is s32. Not sure how to fix that? Best 'fix' is probably to assume that compat_time_t is _always_ going to be s32, and not bother to check for the overflow case at all, since it makes the compiler so unhappy for us to check for it... Signed-off-by: Andrew Morton --- fs/compat.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff -puN fs/compat.c~pselect-ppoll-system-calls-compat-fix fs/compat.c --- devel/fs/compat.c~pselect-ppoll-system-calls-compat-fix 2005-06-29 18:29:39.000000000 -0700 +++ devel-akpm/fs/compat.c 2005-06-29 18:29:39.000000000 -0700 @@ -1788,8 +1788,6 @@ asmlinkage long compat_sys_pselect6(int sigsetsize); } -#define MAX_INT64_SECONDS (((int64_t)(~((uint64_t)0)>>1)/HZ)-1) - asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, struct compat_timespec __user *tsp, const compat_sigset_t __user *sigmask, compat_size_t sigsetsize) @@ -1804,11 +1802,11 @@ asmlinkage long compat_sys_ppoll(struct if (copy_from_user(&ts, tsp, sizeof(ts))) return -EFAULT; - if (ts.tv_sec < MAX_INT64_SECONDS) { - timeout = ROUND_UP(ts.tv_sec, 1000000000/HZ); - timeout += ts.tv_sec * HZ; - } else - timeout = MAX_SCHEDULE_TIMEOUT; + /* We assume that ts.tv_sec is always lower than + the number of seconds that can be expressed in + an int64_t. Otherwise the compiler bitches at us */ + timeout = ROUND_UP(ts.tv_sec, 1000000000/HZ); + timeout += ts.tv_sec * HZ; } if (sigmask) { _