From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 03/31] timer: Remove init_timer_pinned_deferrable() in favor of setup_pinned_deferrable_timer()
Date: Tue, 26 Sep 2017 16:42:11 +0530 [thread overview]
Message-ID: <20170926111211.GC25906@in.ibm.com> (raw)
In-Reply-To: <1505950075-50223-4-git-send-email-keescook@chromium.org>
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
>
next prev parent reply other threads:[~2017-09-26 11:12 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 23:27 [PATCH v2 00/31] struct timer_list callback argument conversion, step 1 Kees Cook
2017-09-20 23:27 ` [PATCH v2 01/31] coccinelle: Improve setup_timer.cocci matching Kees Cook
2017-09-23 20:43 ` Julia Lawall
2017-11-07 0:18 ` Masahiro Yamada
2017-09-20 23:27 ` [PATCH v2 02/31] timer: Convert open-coded init_timer() to setup_timer() Kees Cook
2017-09-20 23:27 ` [PATCH v2 03/31] timer: Remove init_timer_pinned_deferrable() in favor of setup_pinned_deferrable_timer() Kees Cook
2017-09-26 11:12 ` Gautham R Shenoy [this message]
2017-09-20 23:27 ` [PATCH v2 04/31] timer: Remove init_timer_on_stack() in favor of setup_timer_on_stack() Kees Cook
2017-09-20 23:27 ` [PATCH v2 05/31] timer: Remove init_timer_pinned() in favor of setup_pinned_timer() Kees Cook
2017-09-20 23:27 ` [PATCH v2 06/31] timer: Remove init_timer_deferrable() in favor of setup_deferrable_timer() Kees Cook
2017-09-20 23:27 ` [PATCH v2 07/31] timer: Remove users of TIMER_DEFERRED_INITIALIZER Kees Cook
2017-09-20 23:27 ` [PATCH v2 08/31] timer: Remove users of TIMER_INITIALIZER Kees Cook
2017-09-20 23:27 ` [PATCH v2 09/31] timer: Remove unused static initializer macros Kees Cook
2017-09-20 23:27 ` [PATCH v2 10/31] timer: Remove users of expire and data arguments to DEFINE_TIMER Kees Cook
2017-09-20 23:27 ` [PATCH v2 11/31] timer: Remove expires and data arguments from DEFINE_TIMER Kees Cook
2017-09-20 23:27 ` [PATCH v2 12/31] timer: Remove expires argument from __TIMER_INITIALIZER() Kees Cook
2017-09-20 23:27 ` [PATCH v2 13/31] timer: Remove meaningless .data/.function assignments Kees Cook
2017-09-20 23:27 ` [PATCH v2 14/31] timer: Collapse cross-function single-assignment .data into setup_timer() Kees Cook
2017-09-20 23:27 ` [PATCH v2 15/31] timer: Additional init_timer() -> setup_timer() conversions Kees Cook
2017-09-20 23:27 ` [PATCH v2 16/31] usb/phy-isp1301-omap: Remove .data assignment Kees Cook
2017-09-28 9:36 ` Felipe Balbi
2017-09-20 23:27 ` [PATCH v2 17/31] media/i2c/tc358743: Initialize timer Kees Cook
2017-09-20 23:27 ` [PATCH v2 18/31] scsi/aic7xxx: Clean up timer usage Kees Cook
2017-09-21 7:35 ` Hannes Reinecke
2017-09-20 23:27 ` [PATCH v2 19/31] timer: Remove open-coded casts for .data and .function Kees Cook
2017-09-20 23:27 ` [PATCH v2 20/31] net/core: Collapse redundant sk_timer callback data assignments Kees Cook
2017-09-20 23:27 ` [PATCH v2 21/31] s390/char/sclp: Use separate static data field with with static timer Kees Cook
2017-09-20 23:27 ` [PATCH v2 22/31] sparc/led: " Kees Cook
2017-09-20 23:27 ` [PATCH v2 23/31] mips/sgi-ip32: " Kees Cook
2017-09-20 23:27 ` [PATCH v2 24/31] mips/sgi-ip22: " Kees Cook
2017-09-20 23:27 ` [PATCH v2 25/31] net/atm/mpc: " Kees Cook
2017-09-20 23:27 ` [PATCH v2 26/31] staging/comedi/das16: Make timer initialization unconditional Kees Cook
2017-09-21 10:33 ` Ian Abbott
2017-09-20 23:27 ` [PATCH v2 27/31] usb/gadget/snps_udc_core: Remove struct timer_list.data use Kees Cook
2017-09-21 14:06 ` Michal Nazarewicz
2017-09-28 9:36 ` Felipe Balbi
2017-09-20 23:27 ` [PATCH v2 28/31] infiniband/rdmavt: Remove redundant timer initialization Kees Cook
2017-09-20 23:27 ` [PATCH v2 29/31] scsi/bnx2i: Initialize timer Kees Cook
2017-09-20 23:27 ` [PATCH v2 30/31] appletalk: Remove unneeded synchronization Kees Cook
2017-09-20 23:27 ` [PATCH v2 31/31] timer: Switch to testing for .function instead of .data Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170926111211.GC25906@in.ibm.com \
--to=ego@linux.vnet.ibm.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox