mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-04 12:54:37 +08:00
i40e: Avoid some useless variables and initializers in NVM functions
Fixes: 09f79fd49d
("i40e: avoid NVM acquire deadlock during NVM update")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
3d7d7a86ec
commit
2c4d36b708
@ -311,13 +311,10 @@ static i40e_status i40e_read_nvm_word_aq(struct i40e_hw *hw, u16 offset,
|
||||
static i40e_status __i40e_read_nvm_word(struct i40e_hw *hw,
|
||||
u16 offset, u16 *data)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
|
||||
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
|
||||
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
|
||||
else
|
||||
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
|
||||
return ret_code;
|
||||
return i40e_read_nvm_word_aq(hw, offset, data);
|
||||
|
||||
return i40e_read_nvm_word_srctl(hw, offset, data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -331,7 +328,7 @@ static i40e_status __i40e_read_nvm_word(struct i40e_hw *hw,
|
||||
i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
i40e_status ret_code;
|
||||
|
||||
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
|
||||
if (ret_code)
|
||||
@ -446,13 +443,10 @@ static i40e_status __i40e_read_nvm_buffer(struct i40e_hw *hw,
|
||||
u16 offset, u16 *words,
|
||||
u16 *data)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
|
||||
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
|
||||
ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, data);
|
||||
else
|
||||
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
|
||||
return ret_code;
|
||||
return i40e_read_nvm_buffer_aq(hw, offset, words, data);
|
||||
|
||||
return i40e_read_nvm_buffer_srctl(hw, offset, words, data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user