mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 19:50:53 +07:00
ip_gre: remove redundant variables t_hlen
After commit ffc2b6ee41
("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 <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
13dde04f5c
commit
1296ee8ffc
@ -985,7 +985,6 @@ static void ipgre_tunnel_setup(struct net_device *dev)
|
|||||||
static void __gre_tunnel_init(struct net_device *dev)
|
static void __gre_tunnel_init(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct ip_tunnel *tunnel;
|
struct ip_tunnel *tunnel;
|
||||||
int t_hlen;
|
|
||||||
|
|
||||||
tunnel = netdev_priv(dev);
|
tunnel = netdev_priv(dev);
|
||||||
tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
|
tunnel->tun_hlen = gre_calc_hlen(tunnel->parms.o_flags);
|
||||||
@ -993,8 +992,6 @@ static void __gre_tunnel_init(struct net_device *dev)
|
|||||||
|
|
||||||
tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
|
tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
|
||||||
|
|
||||||
t_hlen = tunnel->hlen + sizeof(struct iphdr);
|
|
||||||
|
|
||||||
dev->features |= GRE_FEATURES;
|
dev->features |= GRE_FEATURES;
|
||||||
dev->hw_features |= GRE_FEATURES;
|
dev->hw_features |= GRE_FEATURES;
|
||||||
|
|
||||||
@ -1304,13 +1301,11 @@ static const struct net_device_ops gre_tap_netdev_ops = {
|
|||||||
static int erspan_tunnel_init(struct net_device *dev)
|
static int erspan_tunnel_init(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||||
int t_hlen;
|
|
||||||
|
|
||||||
tunnel->tun_hlen = 8;
|
tunnel->tun_hlen = 8;
|
||||||
tunnel->parms.iph.protocol = IPPROTO_GRE;
|
tunnel->parms.iph.protocol = IPPROTO_GRE;
|
||||||
tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
|
tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen +
|
||||||
erspan_hdr_len(tunnel->erspan_ver);
|
erspan_hdr_len(tunnel->erspan_ver);
|
||||||
t_hlen = tunnel->hlen + sizeof(struct iphdr);
|
|
||||||
|
|
||||||
dev->features |= GRE_FEATURES;
|
dev->features |= GRE_FEATURES;
|
||||||
dev->hw_features |= GRE_FEATURES;
|
dev->hw_features |= GRE_FEATURES;
|
||||||
|
Loading…
Reference in New Issue
Block a user