From patchwork Fri Feb 14 09:15:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Yufen X-Patchwork-Id: 320334 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 563D82C00AE for ; Fri, 14 Feb 2014 20:16:02 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752491AbaBNJPz (ORCPT ); Fri, 14 Feb 2014 04:15:55 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:64477 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbaBNJPt (ORCPT ); Fri, 14 Feb 2014 04:15:49 -0500 Received: from 172.24.2.119 (EHLO szxeml210-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BRI48058; Fri, 14 Feb 2014 17:15:44 +0800 (CST) Received: from SZXEML404-HUB.china.huawei.com (10.82.67.59) by szxeml210-edg.china.huawei.com (172.24.2.183) with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 14 Feb 2014 17:15:20 +0800 Received: from localhost (10.177.25.231) by szxeml404-hub.china.huawei.com (10.82.67.59) with Microsoft SMTP Server id 14.3.158.1; Fri, 14 Feb 2014 17:15:20 +0800 From: Wangyufen To: CC: Subject: [PATCH 5/6] bonding:fix checkpatch warnings braces {} Date: Fri, 14 Feb 2014 17:15:16 +0800 Message-ID: <1392369317-8072-6-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 | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index cde39f0..e7a4600 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -1343,9 +1343,8 @@ void bond_alb_deinitialize(struct bonding *bond) tlb_deinitialize(bond); - if (bond_info->rlb_enabled) { + if (bond_info->rlb_enabled) rlb_deinitialize(bond); - } } int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev) @@ -1429,9 +1428,8 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev) break; case ETH_P_ARP: do_tx_balance = 0; - if (bond_info->rlb_enabled) { + if (bond_info->rlb_enabled) tx_slave = rlb_arp_xmit(skb, bond); - } break; default: do_tx_balance = 0; @@ -1565,11 +1563,10 @@ void bond_alb_monitor(struct work_struct *work) --bond_info->rlb_update_delay_counter; } else { rlb_update_rx_clients(bond); - if (bond_info->rlb_update_retry_counter) { + if (bond_info->rlb_update_retry_counter) --bond_info->rlb_update_retry_counter; - } else { + else bond_info->rx_ntt = 0; - } } } } @@ -1586,23 +1583,20 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave) int res; res = alb_set_slave_mac_addr(slave, slave->perm_hwaddr); - if (res) { + if (res) return res; - } res = alb_handle_addr_collision_on_attach(bond, slave); - if (res) { + if (res) return res; - } tlb_init_slave(slave); /* order a rebalance ASAP */ bond->alb_info.tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS; - if (bond->alb_info.rlb_enabled) { + if (bond->alb_info.rlb_enabled) bond->alb_info.rlb_rebalance = 1; - } return 0; }