[v3,10/17] common/idpf/base: use 'void' return type
Checks
Commit Message
As idpf_ctlq_deinit always returns success, make it 'void' instead
of returning only success. This also changes the return type for
idpf_deinit_hw as 'void'.
Based on the upstream comments, explicit __le16 typecasting is not
necessary as CPU_TO_LE16 is already being used.
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Signed-off-by: Simei Su <simei.su@intel.com>
---
drivers/common/idpf/base/idpf_common.c | 4 ++--
drivers/common/idpf/base/idpf_controlq.c | 7 ++-----
drivers/common/idpf/base/idpf_controlq_api.h | 2 +-
drivers/common/idpf/base/idpf_prototype.h | 2 +-
4 files changed, 6 insertions(+), 9 deletions(-)
@@ -262,12 +262,12 @@ int idpf_clean_arq_element(struct idpf_hw *hw,
* idpf_deinit_hw - shutdown routine
* @hw: pointer to the hardware structure
*/
-int idpf_deinit_hw(struct idpf_hw *hw)
+void idpf_deinit_hw(struct idpf_hw *hw)
{
hw->asq = NULL;
hw->arq = NULL;
- return idpf_ctlq_deinit(hw);
+ idpf_ctlq_deinit(hw);
}
/**
@@ -75,7 +75,7 @@ static void idpf_ctlq_init_rxq_bufs(struct idpf_ctlq_info *cq)
desc->flags =
CPU_TO_LE16(IDPF_CTLQ_FLAG_BUF | IDPF_CTLQ_FLAG_RD);
desc->opcode = 0;
- desc->datalen = (__le16)CPU_TO_LE16(bi->size);
+ desc->datalen = CPU_TO_LE16(bi->size);
desc->ret_val = 0;
desc->cookie_high = 0;
desc->cookie_low = 0;
@@ -264,16 +264,13 @@ int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
* idpf_ctlq_deinit - destroy all control queues
* @hw: pointer to hw struct
*/
-int idpf_ctlq_deinit(struct idpf_hw *hw)
+void idpf_ctlq_deinit(struct idpf_hw *hw)
{
struct idpf_ctlq_info *cq = NULL, *tmp = NULL;
- int ret_code = 0;
LIST_FOR_EACH_ENTRY_SAFE(cq, tmp, &hw->cq_list_head,
idpf_ctlq_info, cq_list)
idpf_ctlq_remove(hw, cq);
-
- return ret_code;
}
/**
@@ -205,6 +205,6 @@ int idpf_ctlq_post_rx_buffs(struct idpf_hw *hw,
struct idpf_dma_mem **buffs);
/* Will destroy all q including the default mb */
-int idpf_ctlq_deinit(struct idpf_hw *hw);
+void idpf_ctlq_deinit(struct idpf_hw *hw);
#endif /* _IDPF_CONTROLQ_API_H_ */
@@ -20,7 +20,7 @@
#define APF
int idpf_init_hw(struct idpf_hw *hw, struct idpf_ctlq_size ctlq_size);
-int idpf_deinit_hw(struct idpf_hw *hw);
+void idpf_deinit_hw(struct idpf_hw *hw);
int idpf_clean_arq_element(struct idpf_hw *hw,
struct idpf_arq_event_info *e,