i40e: trivial fixes
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Tue, 26 Nov 2013 10:49:16 +0000 (10:49 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 16 Dec 2013 08:49:22 +0000 (00:49 -0800)
Prevent some compiler warnings and implement some other
trivial fixes.

Change-Id: I7f49d79b91b94df1ad4a8306a0410ed72238845f
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_diag.c
drivers/net/ethernet/intel/i40e/i40e_hmc.c
drivers/net/ethernet/intel/i40e/i40e_main.c

index dc6c41fade9e2e2f77f38671fcd0a14d7b2fc495..98c1ef563bf03e0ff0176521d86af12b46daad78 100644 (file)
@@ -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*/
        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) ==
             (0x01 << I40E_SR_CONTROL_WORD_1_SHIFT))) {
                ret_code = i40e_validate_nvm_checksum(hw, NULL);
index 901804af8b0ec7254415738a6ac52e7caad40fce..bcedf3fb11431dd567d62f8075b6fc1e114625a1 100644 (file)
@@ -47,10 +47,10 @@ i40e_status i40e_add_sd_table_entry(struct i40e_hw *hw,
                                              u64 direct_mode_sz)
 {
        enum i40e_memory_type mem_type __attribute__((unused));
-       i40e_status ret_code = 0;
        struct i40e_hmc_sd_entry *sd_entry;
        bool dma_mem_alloc_done = false;
        struct i40e_dma_mem mem;
+       i40e_status ret_code;
        u64 alloc_len;
 
        if (NULL == hmc_info->sd_table.sd_entry) {
index 4d3a20146cde65b0e346264b8b9f7bf07b054b6a..e8bb2bba692a82587e642e218716527774551118 100644 (file)
@@ -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)
 {
-       u32 rxfc, txfc, rxfc_reg;
+       u32 rxfc = 0, txfc = 0, rxfc_reg;
        int ret;
 
        /* find out what's out there already */