From 8b0e195314fabd58a331c4f7b6db75a1565535d7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 25 Dec 2016 12:30:41 +0100 Subject: ktime: Cleanup ktime_set() usage ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/sched') diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 966556ebdbb3..c56fb57f2991 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1456,7 +1456,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) * yield - it could be a while. */ if (unlikely(queued)) { - ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ); + ktime_t to = NSEC_PER_SEC / HZ; set_current_state(TASK_UNINTERRUPTIBLE); schedule_hrtimeout(&to, HRTIMER_MODE_REL); -- cgit v1.2.1