]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1508f42e2b9941b7628b925279d13b1492b5904a
tree81106056c60a2f44a63a207ac31734fce4b2b299
parent0fde5b7e8f4617ba447fea917db7c71cd784da8c
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