Commit 32a6c723 authored by Kees Cook's avatar Kees Cook Committed by Thomas Gleixner
Browse files

workqueue: Convert timers to use timer_setup() (part 2)

In preparation for unconditionally passing the struct timer_list pointer
to all timer callbacks, switch to using the new timer_setup() and
from_timer() to pass the timer pointer explicitly. (The prior workqueue
patch missed a few timers.)
Signed-off-by: default avatarKees Cook <>
Acked-by: default avatarTejun Heo <>
Cc: Lai Jiangshan <>

Signed-off-by: default avatarThomas Gleixner <>
parent c310ce4d
......@@ -1831,9 +1831,9 @@ static void destroy_worker(struct worker *worker)
static void idle_worker_timeout(unsigned long __pool)
static void idle_worker_timeout(struct timer_list *t)
struct worker_pool *pool = (void *)__pool;
struct worker_pool *pool = from_timer(pool, t, idle_timer);
......@@ -1879,9 +1879,9 @@ static void send_mayday(struct work_struct *work)
static void pool_mayday_timeout(unsigned long __pool)
static void pool_mayday_timeout(struct timer_list *t)
struct worker_pool *pool = (void *)__pool;
struct worker_pool *pool = from_timer(pool, t, mayday_timer);
struct work_struct *work;
......@@ -3241,11 +3241,9 @@ static int init_worker_pool(struct worker_pool *pool)
setup_deferrable_timer(&pool->idle_timer, idle_worker_timeout,
(unsigned long)pool);
timer_setup(&pool->idle_timer, idle_worker_timeout, TIMER_DEFERRABLE);
setup_timer(&pool->mayday_timer, pool_mayday_timeout,
(unsigned long)pool);
timer_setup(&pool->mayday_timer, pool_mayday_timeout, 0);
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