ice: remove redundant SRIOV code
authorPiotr Raczynski <piotr.raczynski@intel.com>
Mon, 15 May 2023 19:03:16 +0000 (21:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 16 May 2023 16:38:38 +0000 (09:38 -0700)
commit524012c69ee1421d4a343291a0cfc1998ccba99a
tree57ff5719b76c5b23951c2a2e71e67be273d5cc83
parent369bb5a2a9a76ab6ea2945962d09baa21b4e1a4f
ice: remove redundant SRIOV code

Remove redundant code from ice_get_max_valid_res_idx that has no effect.
ice_pf::irq_tracker is initialized during driver probe, there is no reason
to check it again. Also it is not possible for pf::sriov_base_vector to be
lower than the tracker length, remove WARN_ON that will never happen.

Get rid of ice_get_max_valid_res_idx helper function completely since it
can never return negative value.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_sriov.c