Commit 185981d5 authored by Kees Cook's avatar Kees Cook Committed by Thomas Gleixner

timer: Remove init_timer_pinned() in favor of timer_setup()

This refactors the only users of init_timer_pinned() to use
the new timer_setup() and from_timer(). Drops the definition of
init_timer_pinned().
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: David S. Miller <davem@davemloft.net> # for networking parts
Cc: linux-mips@linux-mips.org
Cc: Petr Mladek <pmladek@suse.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux1394-devel@lists.sourceforge.net
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: linux-s390@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Harish Patil <harish.patil@cavium.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Manish Chopra <manish.chopra@cavium.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-pm@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Mark Gross <mark.gross@intel.com>
Cc: linux-watchdog@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Michael Reed <mdr@sgi.com>
Cc: netdev@vger.kernel.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lkml.kernel.org/r/1507159627-127660-5-git-send-email-keescook@chromium.org
parent 9c6c273a
...@@ -608,9 +608,9 @@ static void tile_net_schedule_egress_timer(struct tile_net_cpu *info) ...@@ -608,9 +608,9 @@ static void tile_net_schedule_egress_timer(struct tile_net_cpu *info)
* ISSUE: Maybe instead track number of expected completions, and free * ISSUE: Maybe instead track number of expected completions, and free
* only that many, resetting to zero if "pending" is ever false. * only that many, resetting to zero if "pending" is ever false.
*/ */
static void tile_net_handle_egress_timer(unsigned long arg) static void tile_net_handle_egress_timer(struct timer_list *t)
{ {
struct tile_net_cpu *info = (struct tile_net_cpu *)arg; struct tile_net_cpu *info = from_timer(info, t, egress_timer);
struct net_device *dev = info->napi.dev; struct net_device *dev = info->napi.dev;
/* The timer is no longer scheduled. */ /* The timer is no longer scheduled. */
...@@ -1004,9 +1004,8 @@ static void tile_net_register(void *dev_ptr) ...@@ -1004,9 +1004,8 @@ static void tile_net_register(void *dev_ptr)
BUG(); BUG();
/* Initialize the egress timer. */ /* Initialize the egress timer. */
init_timer_pinned(&info->egress_timer); timer_setup(&info->egress_timer, tile_net_handle_egress_timer,
info->egress_timer.data = (long)info; TIMER_PINNED);
info->egress_timer.function = tile_net_handle_egress_timer;
u64_stats_init(&info->stats.syncp); u64_stats_init(&info->stats.syncp);
......
...@@ -128,8 +128,6 @@ static inline void init_timer_on_stack_key(struct timer_list *timer, ...@@ -128,8 +128,6 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
#define init_timer(timer) \ #define init_timer(timer) \
__init_timer((timer), 0) __init_timer((timer), 0)
#define init_timer_pinned(timer) \
__init_timer((timer), TIMER_PINNED)
#define init_timer_deferrable(timer) \ #define init_timer_deferrable(timer) \
__init_timer((timer), TIMER_DEFERRABLE) __init_timer((timer), TIMER_DEFERRABLE)
......
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