mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net: tipc: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Maloy <jon.maloy@ericsson.com> Cc: Ying Xue <ying.xue@windriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Cc: tipc-discussion@lists.sourceforge.net Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1556770a1a
commit
31b102bb50
5 changed files with 18 additions and 18 deletions
|
@ -153,7 +153,7 @@ static void tipc_node_link_down(struct tipc_node *n, int bearer_id,
|
|||
bool delete);
|
||||
static void node_lost_contact(struct tipc_node *n, struct sk_buff_head *inputq);
|
||||
static void tipc_node_delete(struct tipc_node *node);
|
||||
static void tipc_node_timeout(unsigned long data);
|
||||
static void tipc_node_timeout(struct timer_list *t);
|
||||
static void tipc_node_fsm_evt(struct tipc_node *n, int evt);
|
||||
static struct tipc_node *tipc_node_find(struct net *net, u32 addr);
|
||||
static void tipc_node_put(struct tipc_node *node);
|
||||
|
@ -361,7 +361,7 @@ struct tipc_node *tipc_node_create(struct net *net, u32 addr, u16 capabilities)
|
|||
goto exit;
|
||||
}
|
||||
tipc_node_get(n);
|
||||
setup_timer(&n->timer, tipc_node_timeout, (unsigned long)n);
|
||||
timer_setup(&n->timer, tipc_node_timeout, 0);
|
||||
n->keepalive_intv = U32_MAX;
|
||||
hlist_add_head_rcu(&n->hash, &tn->node_htable[tipc_hashfn(addr)]);
|
||||
list_for_each_entry_rcu(temp_node, &tn->node_list, list) {
|
||||
|
@ -500,9 +500,9 @@ void tipc_node_remove_conn(struct net *net, u32 dnode, u32 port)
|
|||
|
||||
/* tipc_node_timeout - handle expiration of node timer
|
||||
*/
|
||||
static void tipc_node_timeout(unsigned long data)
|
||||
static void tipc_node_timeout(struct timer_list *t)
|
||||
{
|
||||
struct tipc_node *n = (struct tipc_node *)data;
|
||||
struct tipc_node *n = from_timer(n, t, timer);
|
||||
struct tipc_link_entry *le;
|
||||
struct sk_buff_head xmitq;
|
||||
int bearer_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue