From: Gao Feng Date: Wed, 30 Nov 2016 00:48:44 +0000 (+0800) Subject: driver: ipvlan: Remove useless member mtu_adj of struct ipvl_dev X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f679ed88f8860206edddff725e2749b4cdbb0e8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git driver: ipvlan: Remove useless member mtu_adj of struct ipvl_dev 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ipvlan/ipvlan.h b/drivers/net/ipvlan/ipvlan.h index 7e0732f5ea07..05a62d2216c5 100644 --- a/drivers/net/ipvlan/ipvlan.h +++ b/drivers/net/ipvlan/ipvlan.h @@ -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 { diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index ab90b22e778c..c6aa667b50cd 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c @@ -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)