summaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 04:46:45 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-25 00:07:37 -0400
commit5c658e19a7b53b6d712c3fb08bb88649d362db9f (patch)
tree25640c8681633ef8101fc7d031dc17be9a790428 /net/atm
parent17bfd8c89fb62219fa27a10b9475daea74d20a15 (diff)
net: atm/mpc: Stop using open-coded timer .data field
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using an explicit static variable to hold additional expiration details. Cc: "David S. Miller" <davem@davemloft.net> Cc: Bhumika Goyal <bhumirks@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Reshetova, Elena" <elena.reshetova@intel.com> Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/mpc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index b43d99430eb6..883d25778fa4 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,
95static int mpoa_event_listener(struct notifier_block *mpoa_notifier, 95static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
96 unsigned long event, void *dev); 96 unsigned long event, void *dev);
97static void mpc_timer_refresh(void); 97static void mpc_timer_refresh(void);
98static void mpc_cache_check(unsigned long checking_time); 98static void mpc_cache_check(struct timer_list *unused);
99 99
100static struct llc_snap_hdr llc_snap_mpoa_ctrl = { 100static struct llc_snap_hdr llc_snap_mpoa_ctrl = {
101 0xaa, 0xaa, 0x03, 101 0xaa, 0xaa, 0x03,
@@ -1407,15 +1407,17 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action)
1407 msg_to_mpoad(msg, mpc); 1407 msg_to_mpoad(msg, mpc);
1408} 1408}
1409 1409
1410static unsigned long checking_time;
1411
1410static void mpc_timer_refresh(void) 1412static void mpc_timer_refresh(void)
1411{ 1413{
1412 mpc_timer.expires = jiffies + (MPC_P2 * HZ); 1414 mpc_timer.expires = jiffies + (MPC_P2 * HZ);
1413 mpc_timer.data = mpc_timer.expires; 1415 checking_time = mpc_timer.expires;
1414 mpc_timer.function = mpc_cache_check; 1416 mpc_timer.function = (TIMER_FUNC_TYPE)mpc_cache_check;
1415 add_timer(&mpc_timer); 1417 add_timer(&mpc_timer);
1416} 1418}
1417 1419
1418static void mpc_cache_check(unsigned long checking_time) 1420static void mpc_cache_check(struct timer_list *unused)
1419{ 1421{
1420 struct mpoa_client *mpc = mpcs; 1422 struct mpoa_client *mpc = mpcs;
1421 static unsigned long previous_resolving_check_time; 1423 static unsigned long previous_resolving_check_time;