summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-02 19:45:34 +0200
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-18 04:55:09 +0200
commit1c553bb52eb4c58333a843c0a5888d2329909f62 (patch)
tree37f3a2273aad72ba7a7704b0af46a22fe14b5dd6 /net
parenttipc: Prevent fragmented messages during initial name table exchange (diff)
downloadlinux-1c553bb52eb4c58333a843c0a5888d2329909f62.tar.xz
linux-1c553bb52eb4c58333a843c0a5888d2329909f62.zip
tipc: relocate/coalesce node cast in tipc_named_node_up
Functions like this are called using unsigned longs from function pointers. In this case, the function is passed in a node which is normally internally treated as a u32 by TIPC. Rather than add more casts into this function in the future for each added use of node within, move the cast to a single place on a local. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/name_distr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index 21bc0281ec89..97546f07938c 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -173,13 +173,14 @@ void tipc_named_withdraw(struct publication *publ)
* tipc_named_node_up - tell specified node about all publications by this node
*/
-void tipc_named_node_up(unsigned long node)
+void tipc_named_node_up(unsigned long nodearg)
{
struct tipc_node *n_ptr;
struct link *l_ptr;
struct publication *publ;
struct distr_item *item = NULL;
struct sk_buff *buf = NULL;
+ u32 node = (u32)nodearg;
u32 left = 0;
u32 rest;
u32 max_item_buf = 0;
@@ -187,7 +188,7 @@ void tipc_named_node_up(unsigned long node)
/* compute maximum amount of publication data to send per message */
read_lock_bh(&tipc_net_lock);
- n_ptr = tipc_node_find((u32)node);
+ n_ptr = tipc_node_find(node);
if (n_ptr) {
tipc_node_lock(n_ptr);
l_ptr = n_ptr->active_links[0];