From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
To: davem@davemloft.net
Cc: Jesper Juhl <jj@chaosbits.net>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Subject: [net 2/3] igb: correct hardware type (i210/i211) check in igb_loopback_test()
Date: Sat, 4 Aug 2012 03:25:51 -0700 [thread overview]
Message-ID: <1344075952-4198-3-git-send-email-peter.p.waskiewicz.jr@intel.com> (raw)
In-Reply-To: <1344075952-4198-1-git-send-email-peter.p.waskiewicz.jr@intel.com>
From: Jesper Juhl <jj@chaosbits.net>
In the original code
...
if ((adapter->hw.mac.type == e1000_i210)
|| (adapter->hw.mac.type == e1000_i210)) {
...
the second check of 'adapter->hw.mac.type' is pointless since it tests
for the exact same value as the first.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index a19c84c..ad489b7 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1783,7 +1783,7 @@ static int igb_loopback_test(struct igb_adapter *adapter, u64 *data)
goto out;
}
if ((adapter->hw.mac.type == e1000_i210)
- || (adapter->hw.mac.type == e1000_i210)) {
+ || (adapter->hw.mac.type == e1000_i211)) {
dev_err(&adapter->pdev->dev,
"Loopback test not supported "
"on this part at this time.\n");
--
1.7.10.4
next prev parent reply other threads:[~2012-08-04 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-04 10:25 [net 0/3][pull request] Intel Wired LAN Driver Updates Peter P Waskiewicz Jr
2012-08-04 10:25 ` [net 1/3] igb: Fix for failure to init on some 82576 devices Peter P Waskiewicz Jr
2012-08-04 10:25 ` Peter P Waskiewicz Jr [this message]
2012-08-04 10:25 ` [net 3/3] igb: don't break user visible strings over multiple lines in igb_ethtool.c Peter P Waskiewicz Jr
2012-08-04 10:37 ` [net 0/3][pull request] Intel Wired LAN Driver Updates David Miller
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=1344075952-4198-3-git-send-email-peter.p.waskiewicz.jr@intel.com \
--to=peter.p.waskiewicz.jr@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jj@chaosbits.net \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/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).