Skip to content

Commit

Permalink
i40e: Make i40e_shutdown_adminq() return void
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

drivers/net/ethernet/intel/i40e/i40e_adminq.c:699:13-21: Unneeded
variable: "ret_code". Return "0" on line 710

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Jason Yan authored and Jeff Kirsher committed May 29, 2020
1 parent d601afc commit 3f6023f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions drivers/net/ethernet/intel/i40e/i40e_adminq.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,8 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
* i40e_shutdown_adminq - shutdown routine for the Admin Queue
* @hw: pointer to the hardware structure
**/
i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)
void i40e_shutdown_adminq(struct i40e_hw *hw)
{
i40e_status ret_code = 0;

if (i40e_check_asq_alive(hw))
i40e_aq_queue_shutdown(hw, true);

Expand All @@ -706,8 +704,6 @@ i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)

if (hw->nvm_buff.va)
i40e_free_virt_mem(hw, &hw->nvm_buff);

return ret_code;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/i40e/i40e_prototype.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/* adminq functions */
i40e_status i40e_init_adminq(struct i40e_hw *hw);
i40e_status i40e_shutdown_adminq(struct i40e_hw *hw);
void i40e_shutdown_adminq(struct i40e_hw *hw);
void i40e_adminq_init_ring_data(struct i40e_hw *hw);
i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
struct i40e_arq_event_info *e,
Expand Down

0 comments on commit 3f6023f

Please sign in to comment.