]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ice: remove return variable
authorPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Wed, 31 Mar 2021 21:17:07 +0000 (14:17 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 15 Apr 2021 00:12:17 +0000 (17:12 -0700)
We were saving the return value from ice_vsi_manage_rss_lut(), but
the errors from that function are not critical so change it to
return void and remove the code that saved the value.

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_lib.h
drivers/net/ethernet/intel/ice/ice_main.c

index eb6e352d3387fea1bf482ff81889baaf7a625dee..82e2ce23df3dc51e5f93d4aff4c7039bbcab8498 100644 (file)
@@ -1313,14 +1313,13 @@ err_out:
  * LUT, while in the event of enable request for RSS, it will reconfigure RSS
  * LUT.
  */
-int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)
+void ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)
 {
-       int err = 0;
        u8 *lut;
 
        lut = kzalloc(vsi->rss_table_size, GFP_KERNEL);
        if (!lut)
-               return -ENOMEM;
+               return;
 
        if (ena) {
                if (vsi->rss_lut_user)
@@ -1330,9 +1329,8 @@ int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena)
                                         vsi->rss_size);
        }
 
-       err = ice_set_rss_lut(vsi, lut, vsi->rss_table_size);
+       ice_set_rss_lut(vsi, lut, vsi->rss_table_size);
        kfree(lut);
-       return err;
 }
 
 /**
index f48c5ccb8036b486047572e14f25455697211b2b..511c2316c40c74356c77c075f5fe21a4ba2235d1 100644 (file)
@@ -85,7 +85,7 @@ void ice_vsi_free_rx_rings(struct ice_vsi *vsi);
 
 void ice_vsi_free_tx_rings(struct ice_vsi *vsi);
 
-int ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena);
+void ice_vsi_manage_rss_lut(struct ice_vsi *vsi, bool ena);
 
 void ice_update_tx_ring_stats(struct ice_ring *ring, u64 pkts, u64 bytes);
 
index 02672be04f78df0ff8f5cade3ce63ebc602baec5..6dbaa9099fdff47d5ea788d0a7edc42192d577a1 100644 (file)
@@ -5112,10 +5112,10 @@ ice_set_features(struct net_device *netdev, netdev_features_t features)
         * separate if/else statements to guarantee each feature is checked
         */
        if (features & NETIF_F_RXHASH && !(netdev->features & NETIF_F_RXHASH))
-               ret = ice_vsi_manage_rss_lut(vsi, true);
+               ice_vsi_manage_rss_lut(vsi, true);
        else if (!(features & NETIF_F_RXHASH) &&
                 netdev->features & NETIF_F_RXHASH)
-               ret = ice_vsi_manage_rss_lut(vsi, false);
+               ice_vsi_manage_rss_lut(vsi, false);
 
        if ((features & NETIF_F_HW_VLAN_CTAG_RX) &&
            !(netdev->features & NETIF_F_HW_VLAN_CTAG_RX))