From: Nishanth Aravamudan Use helper functions to convert between timeval structure and jiffies rather than custom logic. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Acked-by: Richard Henderson Signed-off-by: Andrew Morton --- arch/alpha/kernel/osf_sys.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff -puN arch/alpha/kernel/osf_sys.c~alpha-osf_sys-use-helper-functions-to-convert-between-tv-and-jiffies arch/alpha/kernel/osf_sys.c --- 25/arch/alpha/kernel/osf_sys.c~alpha-osf_sys-use-helper-functions-to-convert-between-tv-and-jiffies 2005-05-13 23:51:06.000000000 -0700 +++ 25-akpm/arch/alpha/kernel/osf_sys.c 2005-05-13 23:51:06.000000000 -0700 @@ -1150,16 +1150,13 @@ osf_usleep_thread(struct timeval32 __use if (get_tv32(&tmp, sleep)) goto fault; - ticks = tmp.tv_usec; - ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ); - ticks += tmp.tv_sec * HZ; + ticks = timeval_to_jiffies(&tmp); current->state = TASK_INTERRUPTIBLE; ticks = schedule_timeout(ticks); if (remain) { - tmp.tv_sec = ticks / HZ; - tmp.tv_usec = ticks % HZ; + jiffies_to_timeval(ticks, &tmp); if (put_tv32(remain, &tmp)) goto fault; } _