From: Pavel Skripkin <paskripkin@gmail.com>
To: davem@davemloft.net, kuba@kernel.org,
andriy.shevchenko@linux.intel.com, christophe.jaillet@wanadoo.fr,
kaixuxia@tencent.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Pavel Skripkin <paskripkin@gmail.com>
Subject: [PATCH v2 1/2] net: pch_gbe: remove mii_ethtool_gset() error handling
Date: Wed, 18 Aug 2021 17:18:10 +0300 [thread overview]
Message-ID: <7e8946ac52de91a963beb7fa0354a19a21c5cf73.1629296113.git.paskripkin@gmail.com> (raw)
In-Reply-To: <YRzJwjuoJvjfEJpa@smile.fi.intel.com>
mii_ethtool_gset() does not return any errors, so error handling can be
omitted to make code more simple.
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
Changes in v2:
inverted the order of patches
---
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 8 +-------
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c | 4 +---
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index e351f3d1608f..539bddfab2d4 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -1031,13 +1031,7 @@ static void pch_gbe_watchdog(struct timer_list *t)
struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
netdev->tx_queue_len = adapter->tx_queue_len;
/* mii library handles link maintenance tasks */
- if (mii_ethtool_gset(&adapter->mii, &cmd)) {
- netdev_err(netdev, "ethtool get setting Error\n");
- mod_timer(&adapter->watchdog_timer,
- round_jiffies(jiffies +
- PCH_GBE_WATCHDOG_PERIOD));
- return;
- }
+ mii_ethtool_gset(&adapter->mii, &cmd);
hw->mac.link_speed = ethtool_cmd_speed(&cmd);
hw->mac.link_duplex = cmd.duplex;
/* Set the RGMII control. */
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
index ed832046216a..3426f6fa2b57 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
@@ -301,9 +301,7 @@ void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw)
int ret;
u16 mii_reg;
- ret = mii_ethtool_gset(&adapter->mii, &cmd);
- if (ret)
- netdev_err(adapter->netdev, "Error: mii_ethtool_gset\n");
+ mii_ethtool_gset(&adapter->mii, &cmd);
ethtool_cmd_speed_set(&cmd, hw->mac.link_speed);
cmd.duplex = hw->mac.link_duplex;
--
2.32.0
next prev parent reply other threads:[~2021-08-18 14:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 18:34 [PATCH 1/2] net: mii: make mii_ethtool_gset() return void Pavel Skripkin
2021-08-17 18:35 ` [PATCH 2/2] net: pch_gbe: remove mii_ethtool_gset() error handling Pavel Skripkin
2021-08-18 0:39 ` [PATCH 1/2] net: mii: make mii_ethtool_gset() return void Jakub Kicinski
2021-08-18 8:50 ` Andy Shevchenko
2021-08-18 14:18 ` Pavel Skripkin [this message]
2021-08-18 14:18 ` [PATCH v2 2/2] " Pavel Skripkin
2021-08-18 14:59 ` Andy Shevchenko
2021-08-18 15:06 ` [PATCH v3 1/2] net: pch_gbe: remove mii_ethtool_gset() error handling Pavel Skripkin
2021-08-18 15:07 ` [PATCH v3 2/2] net: mii: make mii_ethtool_gset() return void Pavel Skripkin
2021-08-19 12:20 ` [PATCH v3 1/2] net: pch_gbe: remove mii_ethtool_gset() error handling patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e8946ac52de91a963beb7fa0354a19a21c5cf73.1629296113.git.paskripkin@gmail.com \
--to=paskripkin@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=kaixuxia@tencent.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).