]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
i40e: Deprecating unused macro
authorBimmy Pujari <bimmy.pujari@intel.com>
Fri, 11 Nov 2016 20:39:38 +0000 (12:39 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 Feb 2017 06:39:39 +0000 (22:39 -0800)
I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710
was supposed to be for 40G. But function i40e_is_mac_710
sets I40E_MAC_XL710 for all device IDS, I40E_MAC_X710 is not
used at all. As there is nothing to compare there is no need
for this function. Thus deprecating this extra macro and
removing this function entirely and replacing it with a direct
check.

Change-ID: I7d1769954dccd574a290ac04adb836ebd156730e
Signed-off-by: Bimmy Pujari <bimmy.pujari@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index 8bb0f4b795755ab3c128e9cef466c2e765babb45..cdf812c6b2fd1c4d9f7e8989a95ac8ac50d5f21b 100644 (file)
 /* default to trying for four seconds */
 #define I40E_TRY_LINK_TIMEOUT  (4 * HZ)
 
-/**
- * i40e_is_mac_710 - Return true if MAC is X710/XL710
- * @hw: ptr to the hardware info
- **/
-static inline bool i40e_is_mac_710(struct i40e_hw *hw)
-{
-       if ((hw->mac.type == I40E_MAC_X710) ||
-           (hw->mac.type == I40E_MAC_XL710))
-               return true;
-
-       return false;
-}
-
 /* driver state flags */
 enum i40e_state_t {
        __I40E_TESTING,
index 2d689e0e12a5ee47fa7e1ca074110e7d56463c59..24819248de68f210fdaf65350a5f7af6c6e32aa5 100644 (file)
@@ -8684,7 +8684,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
                                 pf->hw.func_caps.fd_filters_best_effort;
        }
 
-       if (i40e_is_mac_710(&pf->hw) &&
+       if ((pf->hw.mac.type == I40E_MAC_XL710) &&
            (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) ||
            (pf->hw.aq.fw_maj_ver < 4))) {
                pf->flags |= I40E_FLAG_RESTART_AUTONEG;
@@ -8693,13 +8693,13 @@ static int i40e_sw_init(struct i40e_pf *pf)
        }
 
        /* Disable FW LLDP if FW < v4.3 */
-       if (i40e_is_mac_710(&pf->hw) &&
+       if ((pf->hw.mac.type == I40E_MAC_XL710) &&
            (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 3)) ||
            (pf->hw.aq.fw_maj_ver < 4)))
                pf->flags |= I40E_FLAG_STOP_FW_LLDP;
 
        /* Use the FW Set LLDP MIB API if FW > v4.40 */
-       if (i40e_is_mac_710(&pf->hw) &&
+       if ((pf->hw.mac.type == I40E_MAC_XL710) &&
            (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver >= 40)) ||
            (pf->hw.aq.fw_maj_ver >= 5)))
                pf->flags |= I40E_FLAG_USE_SET_LLDP_MIB;
index edc0abdf4783bb7a7affcbf5fc4e428873be9d73..b6cf8d2670a4d500825452f8ac963a3b66334128 100644 (file)
@@ -125,7 +125,6 @@ enum i40e_debug_mask {
  */
 enum i40e_mac_type {
        I40E_MAC_UNKNOWN = 0,
-       I40E_MAC_X710,
        I40E_MAC_XL710,
        I40E_MAC_VF,
        I40E_MAC_X722,
index c85e8a31c0724d81a9c2cd634c53edec2425dfae..92ac60da5201eb7f41506903014282a055f13952 100644 (file)
@@ -100,7 +100,6 @@ enum i40e_debug_mask {
  */
 enum i40e_mac_type {
        I40E_MAC_UNKNOWN = 0,
-       I40E_MAC_X710,
        I40E_MAC_XL710,
        I40E_MAC_VF,
        I40E_MAC_X722,