[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a1cf5e938fa5997041c56cf898fadd830eb488f9.1487187192.git.pavel.belous@aquantia.com>
Date: Wed, 15 Feb 2017 23:01:11 +0300
From: Pavel Belous <Pavel.Belous@...antia.com>
To: "David S . Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org,
Simon Edelhaus <Simon.Edelhaus@...antia.com>,
Alexey Andriyanov <Alexey.Andriyanov@...antia.com>,
Lino Sanfilippo <LinoSanfilippo@....de>,
Pavel Belous <pavel.belous@...antia.com>
Subject: [PATCH net-next 03/13] net: ethernet: aquantia: Removed unnecessary comparsion "old_mtu == new_mtu".
From: Pavel Belous <pavel.belous@...antia.com>
This check is not needed. Function aq_ndev_change_mtu wont be called
if mtu has not changed.
Signed-off-by: Pavel Belous <pavel.belous@...antia.com>
---
drivers/net/ethernet/aquantia/atlantic/aq_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_main.c b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
index c17c70a..e5539c8 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_main.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_main.c
@@ -102,17 +102,15 @@ static int aq_ndev_change_mtu(struct net_device *ndev, int new_mtu)
struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0;
- if (new_mtu == ndev->mtu) {
- err = 0;
- goto err_exit;
- }
if (new_mtu < 68) {
err = -EINVAL;
goto err_exit;
}
+
err = aq_nic_set_mtu(aq_nic, new_mtu + ETH_HLEN);
if (err < 0)
goto err_exit;
+
ndev->mtu = new_mtu;
if (netif_running(ndev)) {
--
2.7.4
Powered by blists - more mailing lists