Commit 4285e25b authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by james toy

We have already new_timer initialized to all-zeros hence in function

initializations are not needed. Document function expectation about
new_timer argument as well.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4bdfb6e4
...@@ -384,7 +384,8 @@ int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *tp) ...@@ -384,7 +384,8 @@ int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *tp)
/* /*
* Validate the clockid_t for a new CPU-clock timer, and initialize the timer. * Validate the clockid_t for a new CPU-clock timer, and initialize the timer.
* This is called from sys_timer_create with the new timer already locked. * This is called from sys_timer_create() and do_cpu_nanosleep() with the
* new timer already all-zeros initialized.
*/ */
int posix_cpu_timer_create(struct k_itimer *new_timer) int posix_cpu_timer_create(struct k_itimer *new_timer)
{ {
...@@ -396,8 +397,6 @@ int posix_cpu_timer_create(struct k_itimer *new_timer) ...@@ -396,8 +397,6 @@ int posix_cpu_timer_create(struct k_itimer *new_timer)
return -EINVAL; return -EINVAL;
INIT_LIST_HEAD(&new_timer->it.cpu.entry); INIT_LIST_HEAD(&new_timer->it.cpu.entry);
new_timer->it.cpu.incr.sched = 0;
new_timer->it.cpu.expires.sched = 0;
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
if (CPUCLOCK_PERTHREAD(new_timer->it_clock)) { if (CPUCLOCK_PERTHREAD(new_timer->it_clock)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment