[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1504222183-61202-4-git-send-email-keescook@chromium.org>
Date: Thu, 31 Aug 2017 16:29:15 -0700
From: Kees Cook <keescook@...omium.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org
Subject: [PATCH 03/31] timer: Remove init_timer_pinned_deferrable() in favor of setup_pinned_deferrable_timer()
Remove uses of init_timer_pinned_deferrable() with open-coded
function and data assignments that could be expressed using
setup_pinned_deferrable_timer().
Signed-off-by: Kees Cook <keescook@...omium.org>
---
drivers/cpufreq/powernv-cpufreq.c | 5 ++---
include/linux/timer.h | 2 --
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 3ff5160451b4..3946660b0987 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -800,9 +800,8 @@ static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy)
policy->driver_data = gpstates;
/* initialize timer */
- init_timer_pinned_deferrable(&gpstates->timer);
- gpstates->timer.data = (unsigned long)policy;
- gpstates->timer.function = gpstate_timer_handler;
+ setup_pinned_deferrable_timer(&gpstates->timer, gpstate_timer_handler,
+ (unsigned long)policy);
gpstates->timer.expires = jiffies +
msecs_to_jiffies(GPSTATE_TIMER_INTERVAL);
spin_lock_init(&gpstates->gpstate_lock);
diff --git a/include/linux/timer.h b/include/linux/timer.h
index e6789b8757d5..1b2bb2d978de 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -132,8 +132,6 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
__init_timer((timer), TIMER_PINNED)
#define init_timer_deferrable(timer) \
__init_timer((timer), TIMER_DEFERRABLE)
-#define init_timer_pinned_deferrable(timer) \
- __init_timer((timer), TIMER_DEFERRABLE | TIMER_PINNED)
#define init_timer_on_stack(timer) \
__init_timer_on_stack((timer), 0)
--
2.7.4
Powered by blists - more mailing lists