Skip to content

Commit

Permalink
driver: ipvlan: Remove useless member mtu_adj of struct ipvl_dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gao Feng authored and David S. Miller committed Nov 30, 2016
1 parent fec668d commit 8f679ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion drivers/net/ipvlan/ipvlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ipvlan/ipvlan_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8f679ed

Please sign in to comment.