Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948AbdHaXaC (ORCPT ); Thu, 31 Aug 2017 19:30:02 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:33667 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbdHaX36 (ORCPT ); Thu, 31 Aug 2017 19:29:58 -0400 X-Google-Smtp-Source: ADKCNb48R3PVlabMtxYLvu2eig6I6rowIk8E3tuzQMzxX7ctGFs2EJJkON4G5cHEevOoIXYcvwJN/w== From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 05/31] timer: Remove init_timer_pinned() in favor of setup_pinned_timer() Date: Thu, 31 Aug 2017 16:29:17 -0700 Message-Id: <1504222183-61202-6-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: 1417 Lines: 40 Remove uses of init_timer_pinned() with open-coded function and data assignments that could be expressed using setup_pinned_timer(). Signed-off-by: Kees Cook --- drivers/net/ethernet/tile/tilepro.c | 5 ++--- include/linux/timer.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c index 49ccee4b9aec..b45c7ee8d5b4 100644 --- a/drivers/net/ethernet/tile/tilepro.c +++ b/drivers/net/ethernet/tile/tilepro.c @@ -1004,9 +1004,8 @@ static void tile_net_register(void *dev_ptr) BUG(); /* Initialize the egress timer. */ - init_timer_pinned(&info->egress_timer); - info->egress_timer.data = (long)info; - info->egress_timer.function = tile_net_handle_egress_timer; + setup_pinned_timer(&info->egress_timer, tile_net_handle_egress_timer, + (long)info); u64_stats_init(&info->stats.syncp); diff --git a/include/linux/timer.h b/include/linux/timer.h index 959ba660aef0..c6a1bc0bdf37 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -128,8 +128,6 @@ static inline void init_timer_on_stack_key(struct timer_list *timer, #define init_timer(timer) \ __init_timer((timer), 0) -#define init_timer_pinned(timer) \ - __init_timer((timer), TIMER_PINNED) #define init_timer_deferrable(timer) \ __init_timer((timer), TIMER_DEFERRABLE) -- 2.7.4