iavf: Fix incorrect use of assigning iavf_status to int
authorMateusz Palczewski <mateusz.palczewski@intel.com>
Thu, 27 Jan 2022 14:16:40 +0000 (15:16 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 1 Mar 2022 16:50:11 +0000 (08:50 -0800)
commit8fc16be67dbaf46d96dc96390c727bc76a12f07c
tree81106056c60a2f44a63a207ac31734fce4b2b299
parentbae569d01a1f4929ce28093be80bbbbacbf1b127
iavf: Fix incorrect use of assigning iavf_status to int

Currently there are functions in iavf_virtchnl.c for polling specific
virtchnl receive events. These are all assigning iavf_status values to
int values. Fix this and explicitly assign int values if iavf_status
is not IAVF_SUCCESS.

Also, refactor a small amount of duplicated code that can be reused by
all of the previously mentioned functions.

Finally, fix some spacing errors for variable assignment and get rid of
all the goto statements in the refactored functions for clarity.

Signed-off-by: Brett Creeley <brett.creeley@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>
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c