driver: ipvlan: Remove useless member mtu_adj of struct ipvl_dev
authorGao Feng <fgao@ikuai8.com>
Wed, 30 Nov 2016 00:48:44 +0000 (08:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 20:01:32 +0000 (15:01 -0500)
The mtu_adj is initialized to zero when alloc mem, there is no any
assignment to mtu_adj. It is only used in ipvlan_adjust_mtu as one
right value.
So it is useless member of struct ipvl_dev, then remove it.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan.h
drivers/net/ipvlan/ipvlan_main.c

index 7e0732f5ea0747dd4df3d53b7c92f3864f6cd0cb..05a62d2216c54651f6158c35d446d2e395b38dc3 100644 (file)
@@ -73,7 +73,6 @@ struct ipvl_dev {
        DECLARE_BITMAP(mac_filters, IPVLAN_MAC_FILTER_SIZE);
        netdev_features_t       sfeatures;
        u32                     msg_enable;
-       u16                     mtu_adj;
 };
 
 struct ipvl_addr {
index ab90b22e778c9e85f89146d4094dd903f159438c..c6aa667b50cdfcaf78f9af0d9111cc8c1c627dc8 100644 (file)
@@ -32,7 +32,7 @@ static const struct l3mdev_ops ipvl_l3mdev_ops = {
 
 static void ipvlan_adjust_mtu(struct ipvl_dev *ipvlan, struct net_device *dev)
 {
-       ipvlan->dev->mtu = dev->mtu - ipvlan->mtu_adj;
+       ipvlan->dev->mtu = dev->mtu;
 }
 
 static int ipvlan_register_nf_hook(void)