Commit 5c658e19 authored by Kees Cook's avatar Kees Cook Committed by David S. Miller

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: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17bfd8c8
...@@ -95,7 +95,7 @@ static netdev_tx_t mpc_send_packet(struct sk_buff *skb, ...@@ -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, static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
unsigned long event, void *dev); unsigned long event, void *dev);
static void mpc_timer_refresh(void); static void mpc_timer_refresh(void);
static void mpc_cache_check(unsigned long checking_time); static void mpc_cache_check(struct timer_list *unused);
static struct llc_snap_hdr llc_snap_mpoa_ctrl = { static struct llc_snap_hdr llc_snap_mpoa_ctrl = {
0xaa, 0xaa, 0x03, 0xaa, 0xaa, 0x03,
...@@ -1407,15 +1407,17 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action) ...@@ -1407,15 +1407,17 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action)
msg_to_mpoad(msg, mpc); msg_to_mpoad(msg, mpc);
} }
static unsigned long checking_time;
static void mpc_timer_refresh(void) static void mpc_timer_refresh(void)
{ {
mpc_timer.expires = jiffies + (MPC_P2 * HZ); mpc_timer.expires = jiffies + (MPC_P2 * HZ);
mpc_timer.data = mpc_timer.expires; checking_time = mpc_timer.expires;
mpc_timer.function = mpc_cache_check; mpc_timer.function = (TIMER_FUNC_TYPE)mpc_cache_check;
add_timer(&mpc_timer); add_timer(&mpc_timer);
} }
static void mpc_cache_check(unsigned long checking_time) static void mpc_cache_check(struct timer_list *unused)
{ {
struct mpoa_client *mpc = mpcs; struct mpoa_client *mpc = mpcs;
static unsigned long previous_resolving_check_time; static unsigned long previous_resolving_check_time;
......
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