[PATCH net-next] iavf: Declare the function iavf_shutdown_adminq as void

From: Zheng Yongjun
Date: Tue Jun 01 2021 - 03:33:20 EST


variable 'ret_code' is unneeded and it's noneed to check the
return value of function iavf_shutdown_adminq,so declare
it as void.

Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
---
drivers/net/ethernet/intel/iavf/iavf_adminq.c | 6 +-----
drivers/net/ethernet/intel/iavf/iavf_prototype.h | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/iavf_adminq.c b/drivers/net/ethernet/intel/iavf/iavf_adminq.c
index 9fa3fa99b4c2..23612c15b111 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_adminq.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_adminq.c
@@ -549,17 +549,13 @@ enum iavf_status iavf_init_adminq(struct iavf_hw *hw)
* iavf_shutdown_adminq - shutdown routine for the Admin Queue
* @hw: pointer to the hardware structure
**/
-enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw)
+void iavf_shutdown_adminq(struct iavf_hw *hw)
{
- enum iavf_status ret_code = 0;
-
if (iavf_check_asq_alive(hw))
iavf_aq_queue_shutdown(hw, true);

iavf_shutdown_asq(hw);
iavf_shutdown_arq(hw);
-
- return ret_code;
}

/**
diff --git a/drivers/net/ethernet/intel/iavf/iavf_prototype.h b/drivers/net/ethernet/intel/iavf/iavf_prototype.h
index edebfbbcffdc..29486aaad116 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_prototype.h
+++ b/drivers/net/ethernet/intel/iavf/iavf_prototype.h
@@ -17,7 +17,7 @@

/* adminq functions */
enum iavf_status iavf_init_adminq(struct iavf_hw *hw);
-enum iavf_status iavf_shutdown_adminq(struct iavf_hw *hw);
+void iavf_shutdown_adminq(struct iavf_hw *hw);
void iavf_adminq_init_ring_data(struct iavf_hw *hw);
enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,
struct iavf_arq_event_info *e,
--
2.25.1