summaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-07-26 20:30:49 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-07-30 23:57:51 +0200
commitb74494872555d1f7888dfd9225700a363f4a84fc (patch)
tree1135ad192836fe3c725448640608e3320549f5a1 /kernel/time
parent511885d7061eda3eb1faf3f57dcc936ff75863f1 (diff)
hrtimer: Remove task argument from hrtimer_init_sleeper()
All callers hand in 'current' and that's the only task pointer which actually makes sense. Remove the task argument and set current in the function. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20190726185752.791885290@linutronix.de
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/hrtimer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 5ee77f1a8a92..de895d86800c 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1639,10 +1639,10 @@ static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer)
return HRTIMER_NORESTART;
}
-void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, struct task_struct *task)
+void hrtimer_init_sleeper(struct hrtimer_sleeper *sl)
{
sl->timer.function = hrtimer_wakeup;
- sl->task = task;
+ sl->task = current;
}
EXPORT_SYMBOL_GPL(hrtimer_init_sleeper);
@@ -1669,7 +1669,7 @@ static int __sched do_nanosleep(struct hrtimer_sleeper *t, enum hrtimer_mode mod
{
struct restart_block *restart;
- hrtimer_init_sleeper(t, current);
+ hrtimer_init_sleeper(t);
do {
set_current_state(TASK_INTERRUPTIBLE);
@@ -1930,7 +1930,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta,
hrtimer_init_on_stack(&t.timer, clock_id, mode);
hrtimer_set_expires_range_ns(&t.timer, *expires, delta);
- hrtimer_init_sleeper(&t, current);
+ hrtimer_init_sleeper(&t);
hrtimer_start_expires(&t.timer, mode);