summaryrefslogtreecommitdiffstats
path: root/net/mpls
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2016-10-21 16:10:22 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-23 17:45:01 -0400
commitf76a9db351f8beb3259c4ba38058de0058ab8000 (patch)
tree278ae5ef644903ecedae091b60eb7240411ae477 /net/mpls
parent7281a66590cbc284272e18cb4acbfb88ddaa4cd8 (diff)
downloadlinux-f76a9db351f8beb3259c4ba38058de0058ab8000.tar.gz
linux-f76a9db351f8beb3259c4ba38058de0058ab8000.tar.bz2
linux-f76a9db351f8beb3259c4ba38058de0058ab8000.zip
lwt: Remove unused len field
The field is initialized by ILA and MPLS but never used. Remove it. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mpls')
-rw-r--r--net/mpls/mpls_iptunnel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mpls/mpls_iptunnel.c b/net/mpls/mpls_iptunnel.c
index cf52cf30ac4b..2f7ccd934416 100644
--- a/net/mpls/mpls_iptunnel.c
+++ b/net/mpls/mpls_iptunnel.c
@@ -133,7 +133,6 @@ static int mpls_build_state(struct net_device *dev, struct nlattr *nla,
struct mpls_iptunnel_encap *tun_encap_info;
struct nlattr *tb[MPLS_IPTUNNEL_MAX + 1];
struct lwtunnel_state *newts;
- int tun_encap_info_len;
int ret;
ret = nla_parse_nested(tb, MPLS_IPTUNNEL_MAX, nla,
@@ -144,13 +143,11 @@ static int mpls_build_state(struct net_device *dev, struct nlattr *nla,
if (!tb[MPLS_IPTUNNEL_DST])
return -EINVAL;
- tun_encap_info_len = sizeof(*tun_encap_info);
- newts = lwtunnel_state_alloc(tun_encap_info_len);
+ newts = lwtunnel_state_alloc(sizeof(*tun_encap_info));
if (!newts)
return -ENOMEM;
- newts->len = tun_encap_info_len;
tun_encap_info = mpls_lwtunnel_encap(newts);
ret = nla_get_labels(tb[MPLS_IPTUNNEL_DST], MAX_NEW_LABELS,
&tun_encap_info->labels, tun_encap_info->label);