ice: convert ice_reset_vf to standard error codes
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 23 Feb 2022 00:27:06 +0000 (16:27 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 15 Mar 2022 20:22:49 +0000 (13:22 -0700)
commit4fe193cc9dd09565b61de2bf3dd62924443929dd
treec7d77359433dae131ce3d69fdbe3112e4baedfed
parentfe99d1c06c16b8a97d844a3554f67f601abeb738
ice: convert ice_reset_vf to standard error codes

The ice_reset_vf function returns a boolean value indicating whether or
not the VF reset. This is a bit confusing since it means that callers
need to know how to interpret the return value when needing to indicate
an error.

Refactor the function and call sites to report a regular error code. We
still report success (i.e. return 0) in cases where the reset is in
progress or is disabled.

Existing callers don't care because they do not check the return value.
We keep the error code anyways instead of a void return because we
expect future code which may care about or at least report the error
value.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_vf_lib.c
drivers/net/ethernet/intel/ice/ice_vf_lib.h