Commit 895106a5 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher

i40e: trivial fixes

Prevent some compiler warnings and implement some other
trivial fixes.

Change-Id: I7f49d79b91b94df1ad4a8306a0410ed72238845f
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d52c20b7
...@@ -119,7 +119,7 @@ i40e_status i40e_diag_eeprom_test(struct i40e_hw *hw) ...@@ -119,7 +119,7 @@ i40e_status i40e_diag_eeprom_test(struct i40e_hw *hw)
/* read NVM control word and if NVM valid, validate EEPROM checksum*/ /* read NVM control word and if NVM valid, validate EEPROM checksum*/
ret_code = i40e_read_nvm_word(hw, I40E_SR_NVM_CONTROL_WORD, &reg_val); ret_code = i40e_read_nvm_word(hw, I40E_SR_NVM_CONTROL_WORD, &reg_val);
if ((!ret_code) && if (!ret_code &&
((reg_val & I40E_SR_CONTROL_WORD_1_MASK) == ((reg_val & I40E_SR_CONTROL_WORD_1_MASK) ==
(0x01 << I40E_SR_CONTROL_WORD_1_SHIFT))) { (0x01 << I40E_SR_CONTROL_WORD_1_SHIFT))) {
ret_code = i40e_validate_nvm_checksum(hw, NULL); ret_code = i40e_validate_nvm_checksum(hw, NULL);
......
...@@ -47,10 +47,10 @@ i40e_status i40e_add_sd_table_entry(struct i40e_hw *hw, ...@@ -47,10 +47,10 @@ i40e_status i40e_add_sd_table_entry(struct i40e_hw *hw,
u64 direct_mode_sz) u64 direct_mode_sz)
{ {
enum i40e_memory_type mem_type __attribute__((unused)); enum i40e_memory_type mem_type __attribute__((unused));
i40e_status ret_code = 0;
struct i40e_hmc_sd_entry *sd_entry; struct i40e_hmc_sd_entry *sd_entry;
bool dma_mem_alloc_done = false; bool dma_mem_alloc_done = false;
struct i40e_dma_mem mem; struct i40e_dma_mem mem;
i40e_status ret_code;
u64 alloc_len; u64 alloc_len;
if (NULL == hmc_info->sd_table.sd_entry) { if (NULL == hmc_info->sd_table.sd_entry) {
......
...@@ -6911,7 +6911,7 @@ int i40e_fetch_switch_configuration(struct i40e_pf *pf, bool printconfig) ...@@ -6911,7 +6911,7 @@ int i40e_fetch_switch_configuration(struct i40e_pf *pf, bool printconfig)
**/ **/
static int i40e_setup_pf_switch(struct i40e_pf *pf) static int i40e_setup_pf_switch(struct i40e_pf *pf)
{ {
u32 rxfc, txfc, rxfc_reg; u32 rxfc = 0, txfc = 0, rxfc_reg;
int ret; int ret;
/* find out what's out there already */ /* find out what's out there already */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment