提交 d34a15ab 编写于 作者: C Carolyn Wyborny 提交者: Jeff Kirsher

igb: Cleanups to fix braces location warnings

This patch fixes WARNING:BRACES and ERROR:OPEN_BRACE from
checkpatch file check.
Signed-off-by: NCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 c75c4edf
...@@ -73,9 +73,8 @@ static s32 igb_validate_nvm_checksum_82580(struct e1000_hw *hw); ...@@ -73,9 +73,8 @@ static s32 igb_validate_nvm_checksum_82580(struct e1000_hw *hw);
static s32 igb_update_nvm_checksum_82580(struct e1000_hw *hw); static s32 igb_update_nvm_checksum_82580(struct e1000_hw *hw);
static s32 igb_validate_nvm_checksum_i350(struct e1000_hw *hw); static s32 igb_validate_nvm_checksum_i350(struct e1000_hw *hw);
static s32 igb_update_nvm_checksum_i350(struct e1000_hw *hw); static s32 igb_update_nvm_checksum_i350(struct e1000_hw *hw);
static const u16 e1000_82580_rxpbs_table[] = static const u16 e1000_82580_rxpbs_table[] = {
{ 36, 72, 144, 1, 2, 4, 8, 16, 36, 72, 144, 1, 2, 4, 8, 16, 35, 70, 140 };
35, 70, 140 };
/** /**
* igb_sgmii_uses_mdio_82575 - Determine if I2C pins are for external MDIO * igb_sgmii_uses_mdio_82575 - Determine if I2C pins are for external MDIO
...@@ -1436,9 +1435,8 @@ static s32 igb_reset_hw_82575(struct e1000_hw *hw) ...@@ -1436,9 +1435,8 @@ static s32 igb_reset_hw_82575(struct e1000_hw *hw)
/* set the completion timeout for interface */ /* set the completion timeout for interface */
ret_val = igb_set_pcie_completion_timeout(hw); ret_val = igb_set_pcie_completion_timeout(hw);
if (ret_val) { if (ret_val)
hw_dbg("PCI-E Set completion timeout has failed.\n"); hw_dbg("PCI-E Set completion timeout has failed.\n");
}
hw_dbg("Masking off all interrupts\n"); hw_dbg("Masking off all interrupts\n");
wr32(E1000_IMC, 0xffffffff); wr32(E1000_IMC, 0xffffffff);
......
...@@ -1196,8 +1196,8 @@ static bool reg_pattern_test(struct igb_adapter *adapter, u64 *data, ...@@ -1196,8 +1196,8 @@ static bool reg_pattern_test(struct igb_adapter *adapter, u64 *data,
{ {
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
u32 pat, val; u32 pat, val;
static const u32 _test[] = static const u32 _test[] = {
{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; 0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
for (pat = 0; pat < ARRAY_SIZE(_test); pat++) { for (pat = 0; pat < ARRAY_SIZE(_test); pat++) {
wr32(reg, (_test[pat] & write)); wr32(reg, (_test[pat] & write));
val = rd32(reg) & mask; val = rd32(reg) & mask;
......
...@@ -4235,9 +4235,8 @@ static void igb_watchdog_task(struct work_struct *work) ...@@ -4235,9 +4235,8 @@ static void igb_watchdog_task(struct work_struct *work)
/* check for thermal sensor event */ /* check for thermal sensor event */
if (igb_thermal_sensor_event(hw, if (igb_thermal_sensor_event(hw,
E1000_THSTAT_LINK_THROTTLE)) { E1000_THSTAT_LINK_THROTTLE))
netdev_info(netdev, "The network adapter link speed was downshifted because it overheated\n"); netdev_info(netdev, "The network adapter link speed was downshifted because it overheated\n");
}
/* adjust timeout factor according to speed/duplex */ /* adjust timeout factor according to speed/duplex */
adapter->tx_timeout_factor = 1; adapter->tx_timeout_factor = 1;
...@@ -4473,13 +4472,12 @@ static void igb_update_itr(struct igb_q_vector *q_vector, ...@@ -4473,13 +4472,12 @@ static void igb_update_itr(struct igb_q_vector *q_vector,
case low_latency: /* 50 usec aka 20000 ints/s */ case low_latency: /* 50 usec aka 20000 ints/s */
if (bytes > 10000) { if (bytes > 10000) {
/* this if handles the TSO accounting */ /* this if handles the TSO accounting */
if (bytes/packets > 8000) { if (bytes/packets > 8000)
itrval = bulk_latency; itrval = bulk_latency;
} else if ((packets < 10) || ((bytes/packets) > 1200)) { else if ((packets < 10) || ((bytes/packets) > 1200))
itrval = bulk_latency; itrval = bulk_latency;
} else if ((packets > 35)) { else if ((packets > 35))
itrval = lowest_latency; itrval = lowest_latency;
}
} else if (bytes/packets > 2000) { } else if (bytes/packets > 2000) {
itrval = bulk_latency; itrval = bulk_latency;
} else if (packets <= 2 && bytes < 512) { } else if (packets <= 2 && bytes < 512) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册