Skip to contentSkip to conversation

alpha/osf_sys: use helper functions to convert between

PATCH New Nishanth Aravamudan 1 participant 1 message May 2, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alpha/osf_sys: use helper functions to convert between

Use helper functions to convert between timeval structure and jiffies rather than custom logic.

arch/alpha/kernel/osf_sys.c +2 -5
@@ -1166,16 +1166,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;
 	}

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors