Commit 35d75ee4 authored by Wang Yufen's avatar Wang Yufen Committed by David S. Miller

bonding:fix checkpatch warnings braces {}

Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fdb89d75
...@@ -518,9 +518,8 @@ static void rlb_update_client(struct rlb_client_info *client_info) ...@@ -518,9 +518,8 @@ static void rlb_update_client(struct rlb_client_info *client_info)
{ {
int i; int i;
if (!client_info->slave) { if (!client_info->slave)
return; return;
}
for (i = 0; i < RLB_ARP_BURST_SIZE; i++) { for (i = 0; i < RLB_ARP_BURST_SIZE; i++) {
struct sk_buff *skb; struct sk_buff *skb;
...@@ -568,11 +567,10 @@ static void rlb_update_rx_clients(struct bonding *bond) ...@@ -568,11 +567,10 @@ static void rlb_update_rx_clients(struct bonding *bond)
client_info = &(bond_info->rx_hashtbl[hash_index]); client_info = &(bond_info->rx_hashtbl[hash_index]);
if (client_info->ntt) { if (client_info->ntt) {
rlb_update_client(client_info); rlb_update_client(client_info);
if (bond_info->rlb_update_retry_counter == 0) { if (bond_info->rlb_update_retry_counter == 0)
client_info->ntt = 0; client_info->ntt = 0;
} }
} }
}
/* do not update the entries again until this counter is zero so that /* do not update the entries again until this counter is zero so that
* not to confuse the clients. * not to confuse the clients.
...@@ -764,9 +762,8 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond) ...@@ -764,9 +762,8 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
* rx channel * rx channel
*/ */
tx_slave = rlb_choose_channel(skb, bond); tx_slave = rlb_choose_channel(skb, bond);
if (tx_slave) { if (tx_slave)
memcpy(arp->mac_src, tx_slave->dev->dev_addr, ETH_ALEN); memcpy(arp->mac_src, tx_slave->dev->dev_addr, ETH_ALEN);
}
pr_debug("Server sent ARP Reply packet\n"); pr_debug("Server sent ARP Reply packet\n");
} else if (arp->op_code == htons(ARPOP_REQUEST)) { } else if (arp->op_code == htons(ARPOP_REQUEST)) {
/* Create an entry in the rx_hashtbl for this client as a /* Create an entry in the rx_hashtbl for this client as a
...@@ -818,9 +815,8 @@ static void rlb_rebalance(struct bonding *bond) ...@@ -818,9 +815,8 @@ static void rlb_rebalance(struct bonding *bond)
} }
/* update the team's flag only after the whole iteration */ /* update the team's flag only after the whole iteration */
if (ntt) { if (ntt)
bond_info->rx_ntt = 1; bond_info->rx_ntt = 1;
}
_unlock_rx_hashtbl_bh(bond); _unlock_rx_hashtbl_bh(bond);
} }
...@@ -951,9 +947,8 @@ static int rlb_initialize(struct bonding *bond) ...@@ -951,9 +947,8 @@ static int rlb_initialize(struct bonding *bond)
bond_info->rx_hashtbl_used_head = RLB_NULL_INDEX; bond_info->rx_hashtbl_used_head = RLB_NULL_INDEX;
for (i = 0; i < RLB_HASH_TABLE_SIZE; i++) { for (i = 0; i < RLB_HASH_TABLE_SIZE; i++)
rlb_init_table_entry(bond_info->rx_hashtbl + i); rlb_init_table_entry(bond_info->rx_hashtbl + i);
}
_unlock_rx_hashtbl_bh(bond); _unlock_rx_hashtbl_bh(bond);
...@@ -1324,9 +1319,8 @@ int bond_alb_initialize(struct bonding *bond, int rlb_enabled) ...@@ -1324,9 +1319,8 @@ int bond_alb_initialize(struct bonding *bond, int rlb_enabled)
int res; int res;
res = tlb_initialize(bond); res = tlb_initialize(bond);
if (res) { if (res)
return res; return res;
}
if (rlb_enabled) { if (rlb_enabled) {
bond->alb_info.rlb_enabled = 1; bond->alb_info.rlb_enabled = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment