Skip to content

Commit

Permalink
igb: Cleanups to fix braces location warnings
Browse files Browse the repository at this point in the history
This patch fixes WARNING:BRACES and ERROR:OPEN_BRACE from
checkpatch file check.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Carolyn Wyborny authored and Jeff Kirsher committed Apr 23, 2014
1 parent c75c4ed commit d34a15a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
8 changes: 3 additions & 5 deletions drivers/net/ethernet/intel/igb/e1000_82575.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_validate_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[] =
{ 36, 72, 144, 1, 2, 4, 8, 16,
35, 70, 140 };
static const u16 e1000_82580_rxpbs_table[] = {
36, 72, 144, 1, 2, 4, 8, 16, 35, 70, 140 };

/**
* igb_sgmii_uses_mdio_82575 - Determine if I2C pins are for external MDIO
Expand Down Expand Up @@ -1436,9 +1435,8 @@ static s32 igb_reset_hw_82575(struct e1000_hw *hw)

/* set the completion timeout for interface */
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("Masking off all interrupts\n");
wr32(E1000_IMC, 0xffffffff);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,8 @@ static bool reg_pattern_test(struct igb_adapter *adapter, u64 *data,
{
struct e1000_hw *hw = &adapter->hw;
u32 pat, val;
static const u32 _test[] =
{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
static const u32 _test[] = {
0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
for (pat = 0; pat < ARRAY_SIZE(_test); pat++) {
wr32(reg, (_test[pat] & write));
val = rd32(reg) & mask;
Expand Down
10 changes: 4 additions & 6 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4235,9 +4235,8 @@ static void igb_watchdog_task(struct work_struct *work)

/* check for thermal sensor event */
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");
}

/* adjust timeout factor according to speed/duplex */
adapter->tx_timeout_factor = 1;
Expand Down Expand Up @@ -4473,13 +4472,12 @@ static void igb_update_itr(struct igb_q_vector *q_vector,
case low_latency: /* 50 usec aka 20000 ints/s */
if (bytes > 10000) {
/* this if handles the TSO accounting */
if (bytes/packets > 8000) {
if (bytes/packets > 8000)
itrval = bulk_latency;
} else if ((packets < 10) || ((bytes/packets) > 1200)) {
else if ((packets < 10) || ((bytes/packets) > 1200))
itrval = bulk_latency;
} else if ((packets > 35)) {
else if ((packets > 35))
itrval = lowest_latency;
}
} else if (bytes/packets > 2000) {
itrval = bulk_latency;
} else if (packets <= 2 && bytes < 512) {
Expand Down

0 comments on commit d34a15a

Please sign in to comment.