aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-30 17:06:45 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-31 23:38:45 -0400
commit31b102bb501bea50ebc10f4aecf9d788305b8b87 (patch)
treef89a272ba7cd7bd71fe6ffdbb966d30e66cd12de /net/tipc/node.c
parent1556770a1a071435ba7e67c1bc809099dc1de849 (diff)
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>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 89f8ac73bf65..009a81631280 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -153,7 +153,7 @@ static void tipc_node_link_down(struct tipc_node *n, int bearer_id,
153 bool delete); 153 bool delete);
154static void node_lost_contact(struct tipc_node *n, struct sk_buff_head *inputq); 154static void node_lost_contact(struct tipc_node *n, struct sk_buff_head *inputq);
155static void tipc_node_delete(struct tipc_node *node); 155static void tipc_node_delete(struct tipc_node *node);
156static void tipc_node_timeout(unsigned long data); 156static void tipc_node_timeout(struct timer_list *t);
157static void tipc_node_fsm_evt(struct tipc_node *n, int evt); 157static void tipc_node_fsm_evt(struct tipc_node *n, int evt);
158static struct tipc_node *tipc_node_find(struct net *net, u32 addr); 158static struct tipc_node *tipc_node_find(struct net *net, u32 addr);
159static void tipc_node_put(struct tipc_node *node); 159static 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)
361 goto exit; 361 goto exit;
362 } 362 }
363 tipc_node_get(n); 363 tipc_node_get(n);
364 setup_timer(&n->timer, tipc_node_timeout, (unsigned long)n); 364 timer_setup(&n->timer, tipc_node_timeout, 0);
365 n->keepalive_intv = U32_MAX; 365 n->keepalive_intv = U32_MAX;
366 hlist_add_head_rcu(&n->hash, &tn->node_htable[tipc_hashfn(addr)]); 366 hlist_add_head_rcu(&n->hash, &tn->node_htable[tipc_hashfn(addr)]);
367 list_for_each_entry_rcu(temp_node, &tn->node_list, list) { 367 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)
500 500
501/* tipc_node_timeout - handle expiration of node timer 501/* tipc_node_timeout - handle expiration of node timer
502 */ 502 */
503static void tipc_node_timeout(unsigned long data) 503static void tipc_node_timeout(struct timer_list *t)
504{ 504{
505 struct tipc_node *n = (struct tipc_node *)data; 505 struct tipc_node *n = from_timer(n, t, timer);
506 struct tipc_link_entry *le; 506 struct tipc_link_entry *le;
507 struct sk_buff_head xmitq; 507 struct sk_buff_head xmitq;
508 int bearer_id; 508 int bearer_id;