Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbdITX3N (ORCPT ); Wed, 20 Sep 2017 19:29:13 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:45550 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbdITX2X (ORCPT ); Wed, 20 Sep 2017 19:28:23 -0400 X-Google-Smtp-Source: AOwi7QDHlWTLjQQCPfocD+zi7MjOHg0PDkQ5oawlug0WgyzWgQ3/aGGBBO2z6ox4PfxKa4zzbspq2Q== From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , "David S. Miller" , Andrew Morton , Alexey Dobriyan , "Reshetova, Elena" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 25/31] net/atm/mpc: Use separate static data field with with static timer Date: Wed, 20 Sep 2017 16:27:49 -0700 Message-Id: <1505950075-50223-26-git-send-email-keescook@chromium.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505950075-50223-1-git-send-email-keescook@chromium.org> References: <1505950075-50223-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: 1891 Lines: 53 In preparation for changing the timer callback argument to the timer pointer, move to a separate static data variable. Cc: "David S. Miller" Cc: Andrew Morton Cc: Alexey Dobriyan Cc: "Reshetova, Elena" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook --- net/atm/mpc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 63138c8c2269..3b59a053b7cb 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -95,7 +95,7 @@ static netdev_tx_t mpc_send_packet(struct sk_buff *skb, static int mpoa_event_listener(struct notifier_block *mpoa_notifier, unsigned long event, void *dev); static void mpc_timer_refresh(void); -static void mpc_cache_check(unsigned long checking_time); +static void mpc_cache_check(unsigned long unused); static struct llc_snap_hdr llc_snap_mpoa_ctrl = { 0xaa, 0xaa, 0x03, @@ -121,7 +121,8 @@ static struct notifier_block mpoa_notifier = { struct mpoa_client *mpcs = NULL; /* FIXME */ static struct atm_mpoa_qos *qos_head = NULL; -static DEFINE_TIMER(mpc_timer, NULL); +static DEFINE_TIMER(mpc_timer, mpc_cache_check); +static unsigned long checking_time; static struct mpoa_client *find_mpc_by_itfnum(int itf) @@ -1411,12 +1412,11 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action) static void mpc_timer_refresh(void) { mpc_timer.expires = jiffies + (MPC_P2 * HZ); - mpc_timer.data = mpc_timer.expires; - mpc_timer.function = mpc_cache_check; + checking_time = mpc_timer.expires; add_timer(&mpc_timer); } -static void mpc_cache_check(unsigned long checking_time) +static void mpc_cache_check(unsigned long unused) { struct mpoa_client *mpc = mpcs; static unsigned long previous_resolving_check_time; -- 2.7.4