Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
- for (i = 0; i < hash_size; i++) {
+ for (i = 0; i < hash_size; i++)
bond_info->tx_hashtbl = new_hashtbl;
bond_info->tx_hashtbl = new_hashtbl;
- for (i = 0; i < TLB_HASH_TABLE_SIZE; i++) {
+ for (i = 0; i < TLB_HASH_TABLE_SIZE; i++)
tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
tlb_init_table_entry(&bond_info->tx_hashtbl[i], 0);
_unlock_tx_hashtbl_bh(bond);
_unlock_tx_hashtbl_bh(bond);
hash_table[hash_index].next = next_index;
hash_table[hash_index].prev = TLB_NULL_INDEX;
hash_table[hash_index].next = next_index;
hash_table[hash_index].prev = TLB_NULL_INDEX;
- if (next_index != TLB_NULL_INDEX) {
+ if (next_index != TLB_NULL_INDEX)
hash_table[next_index].prev = hash_index;
hash_table[next_index].prev = hash_index;
slave_info->head = hash_index;
slave_info->load +=
slave_info->head = hash_index;
slave_info->load +=
hash_table[hash_index].tx_bytes += skb_len;
hash_table[hash_index].tx_bytes += skb_len;
*/
static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[])
{
*/
static void rlb_teach_disabled_mac_on_primary(struct bonding *bond, u8 addr[])
{
- if (!bond->curr_active_slave) {
+ if (!bond->curr_active_slave)
if (!bond->alb_info.primary_is_promisc) {
if (!dev_set_promiscuity(bond->curr_active_slave->dev, 1))
if (!bond->alb_info.primary_is_promisc) {
if (!dev_set_promiscuity(bond->curr_active_slave->dev, 1))
write_lock_bh(&bond->curr_slave_lock);
write_lock_bh(&bond->curr_slave_lock);
- if (slave != bond->curr_active_slave) {
+ if (slave != bond->curr_active_slave)
rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr);
rlb_teach_disabled_mac_on_primary(bond, slave->dev->dev_addr);
write_unlock_bh(&bond->curr_slave_lock);
}
write_unlock_bh(&bond->curr_slave_lock);
}