]> 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)
commit79765b932577c30a25e3685f1b4625446c116ac6
tree81106056c60a2f44a63a207ac31734fce4b2b299
parentfcc98cb83537e85deb8e03fdcbb7d929eadb9636
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