lkml.org 
[lkml]   [2017]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 03/31] timer: Remove init_timer_pinned_deferrable() in favor of setup_pinned_deferrable_timer()
On Wed, Sep 20, 2017 at 04:27:27PM -0700, Kees Cook wrote:
> 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@chromium.org>

Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

> ---
> 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
>

\
 
 \ /
  Last update: 2017-09-26 13:14    [W:0.188 / U:1.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site