summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec
diff options
context:
space:
mode:
authorMateusz Palczewski <mateusz.palczewski@intel.com>2022-01-27 15:16:29 +0100
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-03-01 08:50:11 -0800
commitbae569d01a1f4929ce28093be80bbbbacbf1b127 (patch)
tree132ec601a66f32f5fe9010f9a51aefff60bea4bf /drivers/net/ethernet/dec
parentc3fec56e12678c3ad68084048a73818a7968d6b8 (diff)
downloadlinux-bae569d01a1f4929ce28093be80bbbbacbf1b127.tar.bz2
iavf: stop leaking iavf_status as "errno" values
Several functions in the iAVF core files take status values of the enum iavf_status and convert them into integer values. This leads to confusion as functions return both Linux errno values and status codes intermixed. Reporting status codes as if they were "errno" values can lead to confusion when reviewing error logs. Additionally, it can lead to unexpected behavior if a return value is not interpreted properly. Fix this by introducing iavf_status_to_errno, a switch that explicitly converts from the status codes into an appropriate error value. Also introduce a virtchnl_status_to_errno function for the one case where we were returning both virtchnl status codes and iavf_status codes in the same function. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/dec')
0 files changed, 0 insertions, 0 deletions