aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorWang Yufen <wangyufen@huawei.com>2014-02-14 04:15:14 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-14 16:20:22 -0500
commitfdb89d75d0fdcca983dc0e8ebfadadb95a370e2a (patch)
tree9d21ba5720132c624962cb4c4e869f9a3e3e4078 /drivers/net/bonding
parent4708a1b1a42a623f83a4119b2970001a80b983fe (diff)
bonding:fix checkpatch warnings braces {}
Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_alb.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index af5ea212c793..a1d4e7a4dc01 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -93,9 +93,8 @@ static inline u8 _simple_hash(const u8 *hash_start, int hash_size)
93 int i; 93 int i;
94 u8 hash = 0; 94 u8 hash = 0;
95 95
96 for (i = 0; i < hash_size; i++) { 96 for (i = 0; i < hash_size; i++)
97 hash ^= hash_start[i]; 97 hash ^= hash_start[i];
98 }
99 98
100 return hash; 99 return hash;
101} 100}
@@ -190,9 +189,8 @@ static int tlb_initialize(struct bonding *bond)
190 189
191 bond_info->tx_hashtbl = new_hashtbl; 190 bond_info->tx_hashtbl = new_hashtbl;
192 191
193 for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) { 192 for (i = 0; i < TLB_HASH_TABLE_SIZE; i++)
194 tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0); 193 tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
195 }
196 194
197 _unlock_tx_hashtbl_bh(bond); 195 _unlock_tx_hashtbl_bh(bond);
198 196
@@ -264,9 +262,8 @@ static struct slave *__tlb_choose_channel(struct bonding *bond, u32 hash_index,
264 hash_table[hash_index].next = next_index; 262 hash_table[hash_index].next = next_index;
265 hash_table[hash_index].prev = TLB_NULL_INDEX; 263 hash_table[hash_index].prev = TLB_NULL_INDEX;
266 264
267 if (next_index != TLB_NULL_INDEX) { 265 if (next_index != TLB_NULL_INDEX)
268 hash_table[next_index].prev = hash_index; 266 hash_table[next_index].prev = hash_index;
269 }
270 267
271 slave_info->head = hash_index; 268 slave_info->head = hash_index;
272 slave_info->load += 269 slave_info->load +=
@@ -274,9 +271,8 @@ static struct slave *__tlb_choose_channel(struct bonding *bond, u32 hash_index,
274 } 271 }
275 } 272 }
276 273
277 if (assigned_slave) { 274 if (assigned_slave)
278 hash_table[hash_index].tx_bytes += skb_len; 275 hash_table[hash_index].tx_bytes += skb_len;
279 }
280 276
281 return assigned_slave; 277 return assigned_slave;
282} 278}
@@ -451,9 +447,8 @@ static struct slave *__rlb_next_rx_slave(struct bonding *bond)
451 */ 447 */
452static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[]) 448static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[])
453{ 449{
454 if (!bond->curr_active_slave) { 450 if (!bond->curr_active_slave)
455 return; 451 return;
456 }
457 452
458 if (!bond->alb_info.primary_is_promisc) { 453 if (!bond->alb_info.primary_is_promisc) {
459 if (!dev_set_promiscuity(bond->curr_active_slave->dev, 1)) 454 if (!dev_set_promiscuity(bond->curr_active_slave->dev, 1))
@@ -513,9 +508,8 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
513 508
514 write_lock_bh(&bond->curr_slave_lock); 509 write_lock_bh(&bond->curr_slave_lock);
515 510
516 if (slave != bond->curr_active_slave) { 511 if (slave != bond->curr_active_slave)
517 rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr); 512 rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr);
518 }
519 513
520 write_unlock_bh(&bond->curr_slave_lock); 514 write_unlock_bh(&bond->curr_slave_lock);
521} 515}