]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit538f3f610a3694e065f9be208d6829b0bf3d5457
treec7d77359433dae131ce3d69fdbe3112e4baedfed
parentafd460809a1fcb85300413a48235cd7a99d05ee3
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