From: YueHaibing <[email protected]>

Upstream commit:
    From: YueHaibing <[email protected]>
    Date: Wed, 1 Aug 2018 10:04:02 +0800
    Subject: [PATCH] ip_gre: remove redundant variables t_hlen

    After commit ffc2b6ee4174 ("ip_gre: fix IFLA_MTU ignored on NEWLINK")
    variable t_hlen is assigned values that are never read,
    hence they are redundant and can be removed.

    Signed-off-by: YueHaibing <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

Cc: YueHaibing <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
---
 datapath/linux/compat/ip_gre.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index 47ee525..47ed5e0 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -681,7 +681,6 @@ err_free_skb:
 static void __gre_tunnel_init(struct net_device *dev)
 {
        struct ip_tunnel *tunnel;
-       int t_hlen;
 
        tunnel = netdev_priv(dev);
        tunnel->tun_hlen = ip_gre_calc_hlen(tunnel->parms.o_flags);
@@ -689,8 +688,6 @@ static void __gre_tunnel_init(struct net_device *dev)
 
        tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
 
-       t_hlen = tunnel->hlen + sizeof(struct iphdr);
-
        dev->features           |= GRE_FEATURES;
        dev->hw_features        |= GRE_FEATURES;
 
@@ -1031,13 +1028,11 @@ EXPORT_SYMBOL_GPL(ovs_gre_fill_metadata_dst);
 static int erspan_tunnel_init(struct net_device *dev)
 {
        struct ip_tunnel *tunnel = netdev_priv(dev);
-       int t_hlen;
 
        tunnel->tun_hlen = 8;
        tunnel->parms.iph.protocol = IPPROTO_GRE;
        tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
                       erspan_hdr_len(tunnel->erspan_ver);
-       t_hlen = tunnel->hlen + sizeof(struct iphdr);
 
        dev->features           |= GRE_FEATURES;
        dev->hw_features        |= GRE_FEATURES;
-- 
1.8.3.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to