summaryrefslogtreecommitdiffstats
path: root/net/tipc/core.h
diff options
context:
space:
mode:
authorJon Paul Maloy2015-07-31 00:24:26 +0200
committerDavid S. Miller2015-07-31 02:25:15 +0200
commit440d8963cd590ec9387d76a36e60c02da9ed944d (patch)
tree7d1135b020321fd3bd06f9bd6dbc1837380858f8 /net/tipc/core.h
parenttipc: use temporary, non-protected skb queue for bundle reception (diff)
downloadkernel-qcow2-linux-440d8963cd590ec9387d76a36e60c02da9ed944d.tar.gz
kernel-qcow2-linux-440d8963cd590ec9387d76a36e60c02da9ed944d.tar.xz
kernel-qcow2-linux-440d8963cd590ec9387d76a36e60c02da9ed944d.zip
tipc: clean up link creation
We simplify the link creation function tipc_link_create() and the way the link struct it is connected to the node struct. In particular, we remove the duplicate initialization of some fields which are anyway set in tipc_link_reset(). Tested-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/core.h')
-rw-r--r--net/tipc/core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/tipc/core.h b/net/tipc/core.h
index f4ed67778c54..b96b41eabf12 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -109,6 +109,11 @@ struct tipc_net {
atomic_t subscription_count;
};
+static inline struct tipc_net *tipc_net(struct net *net)
+{
+ return net_generic(net, tipc_net_id);
+}
+
static inline u16 mod(u16 x)
{
return x & 0xffffu;