From patchwork Fri Feb 14 09:15:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Yufen X-Patchwork-Id: 320333 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0C0462C00AE for ; Fri, 14 Feb 2014 20:15:45 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbaBNJPj (ORCPT ); Fri, 14 Feb 2014 04:15:39 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:64055 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbaBNJPa (ORCPT ); Fri, 14 Feb 2014 04:15:30 -0500 Received: from 172.24.2.119 (EHLO szxeml205-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BRI47997; Fri, 14 Feb 2014 17:15:23 +0800 (CST) Received: from SZXEML401-HUB.china.huawei.com (10.82.67.31) by szxeml205-edg.china.huawei.com (172.24.2.58) with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 14 Feb 2014 17:15:19 +0800 Received: from localhost (10.177.25.231) by szxeml401-hub.china.huawei.com (10.82.67.31) with Microsoft SMTP Server id 14.3.158.1; Fri, 14 Feb 2014 17:15:19 +0800 From: Wangyufen To: CC: Subject: [PATCH 4/6] bonding:fix checkpatch warnings braces {} Date: Fri, 14 Feb 2014 17:15:15 +0800 Message-ID: <1392369317-8072-5-git-send-email-wangyufen@huawei.com> X-Mailer: git-send-email 1.8.1.msysgit.1 In-Reply-To: <1392369317-8072-1-git-send-email-wangyufen@huawei.com> References: <1392369317-8072-1-git-send-email-wangyufen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.25.231] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Wang Yufen Signed-off-by: Wang Yufen --- drivers/net/bonding/bond_alb.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index a1d4e7a..cde39f0 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -518,9 +518,8 @@ static void rlb_update_client(struct rlb_client_info *client_info) { int i; - if (!client_info->slave) { + if (!client_info->slave) return; - } for (i = 0; i < RLB_ARP_BURST_SIZE; i++) { struct sk_buff *skb; @@ -568,9 +567,8 @@ static void rlb_update_rx_clients(struct bonding *bond) client_info = &(bond_info->rx_hashtbl[hash_index]); if (client_info->ntt) { 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; - } } } @@ -764,9 +762,8 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond) * rx channel */ tx_slave = rlb_choose_channel(skb, bond); - if (tx_slave) { + if (tx_slave) memcpy(arp->mac_src, tx_slave->dev->dev_addr, ETH_ALEN); - } pr_debug("Server sent ARP Reply packet\n"); } else if (arp->op_code == htons(ARPOP_REQUEST)) { /* Create an entry in the rx_hashtbl for this client as a @@ -818,9 +815,8 @@ static void rlb_rebalance(struct bonding *bond) } /* update the team's flag only after the whole iteration */ - if (ntt) { + if (ntt) bond_info->rx_ntt = 1; - } _unlock_rx_hashtbl_bh(bond); } @@ -951,9 +947,8 @@ static int rlb_initialize(struct bonding *bond) 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); - } _unlock_rx_hashtbl_bh(bond); @@ -1324,9 +1319,8 @@ int bond_alb_initialize(struct bonding *bond, int rlb_enabled) int res; res = tlb_initialize(bond); - if (res) { + if (res) return res; - } if (rlb_enabled) { bond->alb_info.rlb_enabled = 1;