i40e/i40evf: Clean up code
authorPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Wed, 9 Jul 2014 07:46:10 +0000 (07:46 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 16 Jul 2014 20:57:12 +0000 (13:57 -0700)
1. Remove some break statements that will never get touched.
2. Remove an extra space.
3. Remove a comment for a parameter that doesn't exist
4. Move the assignment of a variable up to get rid of an else case.

Change-ID: I308a4b5ec070b1f0601f13b041ba4375aaad4b06
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_adminq.c
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_adminq.c

index 2708bcdddd41a6c4bb7f3b8ff08e33a20d15c665..0e551f281d594d78cdabb61c1f681cc5a559e514 100644 (file)
@@ -863,7 +863,7 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
                        /* ugh! delay while spin_lock */
                        udelay(delay_len);
                        total_delay += delay_len;
-               } while (total_delay <  hw->aq.asq_cmd_timeout);
+               } while (total_delay < hw->aq.asq_cmd_timeout);
        }
 
        /* if ready, copy the desc back to temp */
index 51087b5c7d911367618865749b07a5c11395bc89..c65f4e8e6cee0800c5568fed1984e3914e3231ac 100644 (file)
@@ -554,7 +554,6 @@ i40e_status i40e_init_shared_code(struct i40e_hw *hw)
                break;
        default:
                return I40E_ERR_DEVICE_NOT_SUPPORTED;
-               break;
        }
 
        hw->phy.get_link_info = true;
index 1f72eeca00cee259da68fc2034260d6e370b4295..c34e39009a8f5c7ae0d43e735490cfa61f7b1ef7 100644 (file)
@@ -6773,13 +6773,12 @@ static int i40e_sw_init(struct i40e_pf *pf)
         * maximum might end up larger than the available queues
         */
        pf->rss_size_max = 0x1 << pf->hw.func_caps.rss_table_entry_width;
+       pf->rss_size = 1;
        pf->rss_size_max = min_t(int, pf->rss_size_max,
                                 pf->hw.func_caps.num_tx_qp);
        if (pf->hw.func_caps.rss) {
                pf->flags |= I40E_FLAG_RSS_ENABLED;
                pf->rss_size = min_t(int, pf->rss_size_max, num_online_cpus());
-       } else {
-               pf->rss_size = 1;
        }
 
        /* MFP mode enabled */
index 79489a8e9ac387cfa64b96de1db1b2a5f331e861..989866af26e5edeaa271ee693bb3286331e27a10 100644 (file)
@@ -303,7 +303,6 @@ static int i40e_add_del_fdir_tcpv4(struct i40e_vsi *vsi,
  * a specific flow spec
  * @vsi: pointer to the targeted VSI
  * @fd_data: the flow director data required for the FDir descriptor
- * @raw_packet: the pre-allocated packet buffer for FDir
  * @add: true adds a filter, false removes it
  *
  * Always returns -EOPNOTSUPP
index cc4b6db10b0444eb3e991151a28c0531fffd0d07..8330744b02f10c3e39a10c64f6c201fb18047d66 100644 (file)
@@ -817,7 +817,7 @@ i40e_status i40evf_asq_send_command(struct i40e_hw *hw,
                        /* ugh! delay while spin_lock */
                        udelay(delay_len);
                        total_delay += delay_len;
-               } while (total_delay <  hw->aq.asq_cmd_timeout);
+               } while (total_delay < hw->aq.asq_cmd_timeout);
        }
 
        /* if ready, copy the desc back to temp */