diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-07-31 12:01:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-01 12:46:49 -0400 |
commit | b053fcc4a1c3c8f9080e2904acee73481fb58c44 (patch) | |
tree | 2ffcaf6e6c7db7804653d234fbcf15428ef1e718 /net/tipc | |
parent | e5121207f0532694b1065e29088c78e609b41e20 (diff) |
net/tipc: remove redundant variables 'tn' and 'oport'
Variables 'tn' and 'oport' are being assigned but are never used hence
they are redundant and can be removed.
Cleans up clang warnings:
warning: variable 'oport' set but not used [-Wunused-but-set-variable]
warning: variable 'tn' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3763bedecf5f..c1e93c9515bc 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -411,7 +411,6 @@ static int tipc_sk_sock_err(struct socket *sock, long *timeout) | |||
411 | static int tipc_sk_create(struct net *net, struct socket *sock, | 411 | static int tipc_sk_create(struct net *net, struct socket *sock, |
412 | int protocol, int kern) | 412 | int protocol, int kern) |
413 | { | 413 | { |
414 | struct tipc_net *tn; | ||
415 | const struct proto_ops *ops; | 414 | const struct proto_ops *ops; |
416 | struct sock *sk; | 415 | struct sock *sk; |
417 | struct tipc_sock *tsk; | 416 | struct tipc_sock *tsk; |
@@ -446,7 +445,6 @@ static int tipc_sk_create(struct net *net, struct socket *sock, | |||
446 | INIT_LIST_HEAD(&tsk->publications); | 445 | INIT_LIST_HEAD(&tsk->publications); |
447 | INIT_LIST_HEAD(&tsk->cong_links); | 446 | INIT_LIST_HEAD(&tsk->cong_links); |
448 | msg = &tsk->phdr; | 447 | msg = &tsk->phdr; |
449 | tn = net_generic(sock_net(sk), tipc_net_id); | ||
450 | 448 | ||
451 | /* Finish initializing socket data structures */ | 449 | /* Finish initializing socket data structures */ |
452 | sock->ops = ops; | 450 | sock->ops = ops; |
@@ -1117,7 +1115,7 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq, | |||
1117 | u32 self = tipc_own_addr(net); | 1115 | u32 self = tipc_own_addr(net); |
1118 | u32 type, lower, upper, scope; | 1116 | u32 type, lower, upper, scope; |
1119 | struct sk_buff *skb, *_skb; | 1117 | struct sk_buff *skb, *_skb; |
1120 | u32 portid, oport, onode; | 1118 | u32 portid, onode; |
1121 | struct sk_buff_head tmpq; | 1119 | struct sk_buff_head tmpq; |
1122 | struct list_head dports; | 1120 | struct list_head dports; |
1123 | struct tipc_msg *hdr; | 1121 | struct tipc_msg *hdr; |
@@ -1133,7 +1131,6 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq, | |||
1133 | user = msg_user(hdr); | 1131 | user = msg_user(hdr); |
1134 | mtyp = msg_type(hdr); | 1132 | mtyp = msg_type(hdr); |
1135 | hlen = skb_headroom(skb) + msg_hdr_sz(hdr); | 1133 | hlen = skb_headroom(skb) + msg_hdr_sz(hdr); |
1136 | oport = msg_origport(hdr); | ||
1137 | onode = msg_orignode(hdr); | 1134 | onode = msg_orignode(hdr); |
1138 | type = msg_nametype(hdr); | 1135 | type = msg_nametype(hdr); |
1139 | 1136 | ||