diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2010-12-11 00:53:47 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-12-25 00:31:49 -0500 |
commit | b1cdfead0e532d7614b5d5b97044df94cc8945ae (patch) | |
tree | 921241c8bac9f03705965a82daf3256cc8033d8d /drivers/net/e1000e | |
parent | 6480641eb741cabbba8e196d4f17db7fb80d101c (diff) |
e1000e: checkpatch warnings - braces
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/ich8lan.c | 5 | ||||
-rw-r--r-- | drivers/net/e1000e/lib.c | 6 | ||||
-rw-r--r-- | drivers/net/e1000e/netdev.c | 19 | ||||
-rw-r--r-- | drivers/net/e1000e/phy.c | 3 |
4 files changed, 12 insertions, 21 deletions
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index 5080372b0fd7..d86cc0832720 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -2309,11 +2309,10 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset, | |||
2309 | */ | 2309 | */ |
2310 | if (ret_val == 0) { | 2310 | if (ret_val == 0) { |
2311 | flash_data = er32flash(ICH_FLASH_FDATA0); | 2311 | flash_data = er32flash(ICH_FLASH_FDATA0); |
2312 | if (size == 1) { | 2312 | if (size == 1) |
2313 | *data = (u8)(flash_data & 0x000000FF); | 2313 | *data = (u8)(flash_data & 0x000000FF); |
2314 | } else if (size == 2) { | 2314 | else if (size == 2) |
2315 | *data = (u16)(flash_data & 0x0000FFFF); | 2315 | *data = (u16)(flash_data & 0x0000FFFF); |
2316 | } | ||
2317 | break; | 2316 | break; |
2318 | } else { | 2317 | } else { |
2319 | /* | 2318 | /* |
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c index 8377523c054a..7e55170a601e 100644 --- a/drivers/net/e1000e/lib.c +++ b/drivers/net/e1000e/lib.c | |||
@@ -493,9 +493,8 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw) | |||
493 | * different link partner. | 493 | * different link partner. |
494 | */ | 494 | */ |
495 | ret_val = e1000e_config_fc_after_link_up(hw); | 495 | ret_val = e1000e_config_fc_after_link_up(hw); |
496 | if (ret_val) { | 496 | if (ret_val) |
497 | e_dbg("Error configuring flow control\n"); | 497 | e_dbg("Error configuring flow control\n"); |
498 | } | ||
499 | 498 | ||
500 | return ret_val; | 499 | return ret_val; |
501 | } | 500 | } |
@@ -1496,9 +1495,8 @@ s32 e1000e_setup_led_generic(struct e1000_hw *hw) | |||
1496 | { | 1495 | { |
1497 | u32 ledctl; | 1496 | u32 ledctl; |
1498 | 1497 | ||
1499 | if (hw->mac.ops.setup_led != e1000e_setup_led_generic) { | 1498 | if (hw->mac.ops.setup_led != e1000e_setup_led_generic) |
1500 | return -E1000_ERR_CONFIG; | 1499 | return -E1000_ERR_CONFIG; |
1501 | } | ||
1502 | 1500 | ||
1503 | if (hw->phy.media_type == e1000_media_type_fiber) { | 1501 | if (hw->phy.media_type == e1000_media_type_fiber) { |
1504 | ledctl = er32(LEDCTL); | 1502 | ledctl = er32(LEDCTL); |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index ec7b77fea98b..fe50242aa9e6 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -1806,9 +1806,8 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter) | |||
1806 | err = pci_enable_msix(adapter->pdev, | 1806 | err = pci_enable_msix(adapter->pdev, |
1807 | adapter->msix_entries, | 1807 | adapter->msix_entries, |
1808 | adapter->num_vectors); | 1808 | adapter->num_vectors); |
1809 | if (err == 0) { | 1809 | if (err == 0) |
1810 | return; | 1810 | return; |
1811 | } | ||
1812 | } | 1811 | } |
1813 | /* MSI-X failed, so fall through and try MSI */ | 1812 | /* MSI-X failed, so fall through and try MSI */ |
1814 | e_err("Failed to initialize MSI-X interrupts. " | 1813 | e_err("Failed to initialize MSI-X interrupts. " |
@@ -2198,9 +2197,8 @@ void e1000e_free_rx_resources(struct e1000_adapter *adapter) | |||
2198 | 2197 | ||
2199 | e1000_clean_rx_ring(adapter); | 2198 | e1000_clean_rx_ring(adapter); |
2200 | 2199 | ||
2201 | for (i = 0; i < rx_ring->count; i++) { | 2200 | for (i = 0; i < rx_ring->count; i++) |
2202 | kfree(rx_ring->buffer_info[i].ps_pages); | 2201 | kfree(rx_ring->buffer_info[i].ps_pages); |
2203 | } | ||
2204 | 2202 | ||
2205 | vfree(rx_ring->buffer_info); | 2203 | vfree(rx_ring->buffer_info); |
2206 | rx_ring->buffer_info = NULL; | 2204 | rx_ring->buffer_info = NULL; |
@@ -2240,20 +2238,18 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter, | |||
2240 | /* handle TSO and jumbo frames */ | 2238 | /* handle TSO and jumbo frames */ |
2241 | if (bytes/packets > 8000) | 2239 | if (bytes/packets > 8000) |
2242 | retval = bulk_latency; | 2240 | retval = bulk_latency; |
2243 | else if ((packets < 5) && (bytes > 512)) { | 2241 | else if ((packets < 5) && (bytes > 512)) |
2244 | retval = low_latency; | 2242 | retval = low_latency; |
2245 | } | ||
2246 | break; | 2243 | break; |
2247 | case low_latency: /* 50 usec aka 20000 ints/s */ | 2244 | case low_latency: /* 50 usec aka 20000 ints/s */ |
2248 | if (bytes > 10000) { | 2245 | if (bytes > 10000) { |
2249 | /* this if handles the TSO accounting */ | 2246 | /* this if handles the TSO accounting */ |
2250 | if (bytes/packets > 8000) { | 2247 | if (bytes/packets > 8000) |
2251 | retval = bulk_latency; | 2248 | retval = bulk_latency; |
2252 | } else if ((packets < 10) || ((bytes/packets) > 1200)) { | 2249 | else if ((packets < 10) || ((bytes/packets) > 1200)) |
2253 | retval = bulk_latency; | 2250 | retval = bulk_latency; |
2254 | } else if ((packets > 35)) { | 2251 | else if ((packets > 35)) |
2255 | retval = lowest_latency; | 2252 | retval = lowest_latency; |
2256 | } | ||
2257 | } else if (bytes/packets > 2000) { | 2253 | } else if (bytes/packets > 2000) { |
2258 | retval = bulk_latency; | 2254 | retval = bulk_latency; |
2259 | } else if (packets <= 2 && bytes < 512) { | 2255 | } else if (packets <= 2 && bytes < 512) { |
@@ -2262,9 +2258,8 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter, | |||
2262 | break; | 2258 | break; |
2263 | case bulk_latency: /* 250 usec aka 4000 ints/s */ | 2259 | case bulk_latency: /* 250 usec aka 4000 ints/s */ |
2264 | if (bytes > 25000) { | 2260 | if (bytes > 25000) { |
2265 | if (packets > 35) { | 2261 | if (packets > 35) |
2266 | retval = low_latency; | 2262 | retval = low_latency; |
2267 | } | ||
2268 | } else if (bytes < 6000) { | 2263 | } else if (bytes < 6000) { |
2269 | retval = low_latency; | 2264 | retval = low_latency; |
2270 | } | 2265 | } |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index e297a23963a5..1781efeb55e3 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -1057,9 +1057,8 @@ static s32 e1000_phy_setup_autoneg(struct e1000_hw *hw) | |||
1057 | 1057 | ||
1058 | e_dbg("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); | 1058 | e_dbg("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); |
1059 | 1059 | ||
1060 | if (phy->autoneg_mask & ADVERTISE_1000_FULL) { | 1060 | if (phy->autoneg_mask & ADVERTISE_1000_FULL) |
1061 | ret_val = e1e_wphy(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); | 1061 | ret_val = e1e_wphy(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); |
1062 | } | ||
1063 | 1062 | ||
1064 | return ret_val; | 1063 | return ret_val; |
1065 | } | 1064 | } |