]> 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)
commit99f532dac99aae84f55d84acf3ffd649a32396b4
treec7d77359433dae131ce3d69fdbe3112e4baedfed
parent3123c6cc19964a3477ec4ed9e8415ef1a1d2e2db
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