igb: correct hardware type (i210/i211) check in igb_loopback_test()
authorJesper Juhl <jj@chaosbits.net>
Wed, 1 Aug 2012 05:41:25 +0000 (05:41 +0000)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Sat, 4 Aug 2012 09:44:29 +0000 (02:44 -0700)
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

index a19c84cad0e991fc429b846b913f704e9cc41f30..ad489b76980f9787ed3967096922a4b3bcb729a4 100644 (file)
@@ -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");