[PATCH net-next] igb: Declare the function igb_init_nvm_params_i210 as void

From: Zheng Yongjun
Date: Tue Jun 01 2021 - 03:34:37 EST


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

Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
---
drivers/net/ethernet/intel/igb/e1000_82575.c | 2 +-
drivers/net/ethernet/intel/igb/e1000_i210.c | 4 +---
drivers/net/ethernet/intel/igb/e1000_i210.h | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index 50863fd87d53..967aa20f4cc6 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -682,7 +682,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
switch (hw->mac.type) {
case e1000_i210:
case e1000_i211:
- ret_val = igb_init_nvm_params_i210(hw);
+ igb_init_nvm_params_i210(hw);
break;
default:
break;
diff --git a/drivers/net/ethernet/intel/igb/e1000_i210.c b/drivers/net/ethernet/intel/igb/e1000_i210.c
index 9265901455cd..986e86ab7978 100644
--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
@@ -790,9 +790,8 @@ s32 igb_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data)
* igb_init_nvm_params_i210 - Init NVM func ptrs.
* @hw: pointer to the HW structure
**/
-s32 igb_init_nvm_params_i210(struct e1000_hw *hw)
+void igb_init_nvm_params_i210(struct e1000_hw *hw)
{
- s32 ret_val = 0;
struct e1000_nvm_info *nvm = &hw->nvm;

nvm->ops.acquire = igb_acquire_nvm_i210;
@@ -813,7 +812,6 @@ s32 igb_init_nvm_params_i210(struct e1000_hw *hw)
nvm->ops.validate = NULL;
nvm->ops.update = NULL;
}
- return ret_val;
}

/**
diff --git a/drivers/net/ethernet/intel/igb/e1000_i210.h b/drivers/net/ethernet/intel/igb/e1000_i210.h
index 5c437fdc49ee..2a436da0be69 100644
--- a/drivers/net/ethernet/intel/igb/e1000_i210.h
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.h
@@ -11,7 +11,7 @@ s32 igb_read_invm_version(struct e1000_hw *hw,
struct e1000_fw_version *invm_ver);
s32 igb_read_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 *data);
s32 igb_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data);
-s32 igb_init_nvm_params_i210(struct e1000_hw *hw);
+void igb_init_nvm_params_i210(struct e1000_hw *hw);
bool igb_get_flash_presence_i210(struct e1000_hw *hw);
s32 igb_pll_workaround_i210(struct e1000_hw *hw);
s32 igb_get_cfg_done_i210(struct e1000_hw *hw);
--
2.25.1