]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: Deprecating unused macro
authorBimmy Pujari <bimmy.pujari@intel.com>
Fri, 11 Nov 2016 20:39:38 +0000 (12:39 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Sat, 10 Jun 2017 01:57:01 +0000 (18:57 -0700)
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>
Orabug: 26132523
(cherry picked from commit 6de432c5ae28e7330e14e85c4c614a67a0a12263)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Brian Maly <brian.maly@oracle.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 0abe0921e9423d6b83fd6e6859200f6be4b53f56..edddf103eea1bce471c7398d3d7359aa0ae8bae6 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 4bf795728e93c1b6c845001606c1c9c0ae4a3d53..b08e61b857111ad197a44a76d4759f8ea8d469d2 100644 (file)
@@ -8624,7 +8624,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;
@@ -8633,13 +8633,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,