Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751905AbdHaX35 (ORCPT ); Thu, 31 Aug 2017 19:29:57 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:37127 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbdHaX3y (ORCPT ); Thu, 31 Aug 2017 19:29:54 -0400 X-Google-Smtp-Source: ADKCNb7mcJ4eRX00E9cQIuPKuXD/0wLIdwPx4MZGMEqJbKzGxjplGTabD5bBdK/A3CmwfiWxidSO5g== From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 03/31] timer: Remove init_timer_pinned_deferrable() in favor of setup_pinned_deferrable_timer() Date: Thu, 31 Aug 2017 16:29:15 -0700 Message-Id: <1504222183-61202-4-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504222183-61202-1-git-send-email-keescook@chromium.org> References: <1504222183-61202-1-git-send-email-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 41 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 --- 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