Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1700136pxj; Sat, 5 Jun 2021 00:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhACaYx7eyhOpr/Xe5LPIYlq2WKGks3QXukv9rKFzjxZMYxYI0aHcoJFWC+e4/wO44m4FK X-Received: by 2002:a05:6402:100c:: with SMTP id c12mr8888230edu.165.1622877044240; Sat, 05 Jun 2021 00:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622877044; cv=none; d=google.com; s=arc-20160816; b=JLOxYpVRJu77co19vlMAUGclga4WQk40BHhEQ9Pbk0iuCiWwDZIRlcQU43a9VQD54X A2/O8j2UPSONemogRzyqLs1jqUAmMLne90/ly/xa6fgdP5dch8csSVA1l+gjVi5W8oVa HBhFUIjbRLva7sJHlBnN1lw+sBkcTWyQXF349elwq2NsiDWJyMPpm60WWUGrP2uFbfbi XFGWUd/Ugec/LMHGR37+JC2OK4kwyYxb7jJj/0daDxnLDc536REDYOUeQsPZhiFYz8al vgkElKT+dDCigboerqsX1dxtdB4TvTRNyEtS+PufQ6BmmcrdRCk7Ug2zDE3xl0W03/Wc 3KEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jyplBpWSsV8MeW0aUvLc5/Hvc4yztQkvyp/NS2JueNc=; b=rv73Q0nZy8rZwjPeeH3EKRZxbGgKeYPonfT8XNV2vWeg3cK1Z6QNks/aJtzWMSD9pq fInLTbt+yLGWY/3fZb1XxwVXrAmS1GU1j157DvtcjE3UbvWetuMnxHi5nm89EJpeXGM8 CVzjgOgEItwS2BGjN8Qqu4cbLAifT0uuuYsk8hd6wcgB5Q95UHHxrNGPCw/E+3NNmkoW HV200o9n/HoKRMzIGxArpHFgchUL7EkNlReJRkbpZvzQgpzP5K1tzgHuJYQnEB5HWy9U /5I74/fE7nuiCCqRucETcfBMh1Gp3uu5ZoGbEgB7wV0escRVQ/ApeB2DH8IOAqBqsS3K V/Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de20si6665872edb.211.2021.06.05.00.10.21; Sat, 05 Jun 2021 00:10:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbhFEHIG (ORCPT + 99 others); Sat, 5 Jun 2021 03:08:06 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:7111 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbhFEHIF (ORCPT ); Sat, 5 Jun 2021 03:08:05 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FxrFZ1gM5zYqHQ; Sat, 5 Jun 2021 15:03:30 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sat, 5 Jun 2021 15:03:35 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 5 Jun 2021 15:03:35 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 5/8] net: hd64570: add braces {} to all arms of the statement Date: Sat, 5 Jun 2021 15:00:26 +0800 Message-ID: <1622876429-47278-6-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622876429-47278-1-git-send-email-huangguangbin2@huawei.com> References: <1622876429-47278-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/hd64570.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index f02cce0..0297fbe 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -262,8 +262,9 @@ static inline void sca_rx(card_t *card, port_t *port, pkt_desc __iomem *desc, memcpy_fromio(skb->data, winbase(card) + buff, maxlen); openwin(card, page + 1); memcpy_fromio(skb->data + maxlen, winbase(card), len - maxlen); - } else + } else { memcpy_fromio(skb->data, winbase(card) + buff, len); + } #ifndef PAGE0_ALWAYS_MAPPED openwin(card, 0); /* select pkt_desc table page back */ @@ -318,8 +319,9 @@ static inline void sca_rx_intr(port_t *port) dev->stats.rx_crc_errors++; if (stat & ST_RX_EOM) port->rxpart = 0; /* received last fragment */ - } else + } else { sca_rx(card, port, desc, port->rxin); + } /* Set new error descriptor address */ sca_outw(desc_off, dmac + EDAL, card); @@ -417,8 +419,9 @@ static void sca_set_port(port_t *port) tmc = 1; br = 0; /* For baud=CLOCK_BASE we use tmc=1 br=0 */ brv = 1; - } else if (tmc > 255) + } else if (tmc > 255) { tmc = 256; /* tmc=0 means 256 - low baud rates */ + } port->settings.clock_rate = CLOCK_BASE / brv / tmc; } else { @@ -651,8 +654,9 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) memcpy_toio(winbase(card) + buff, skb->data, maxlen); openwin(card, page + 1); memcpy_toio(winbase(card), skb->data + maxlen, len - maxlen); - } else + } else { memcpy_toio(winbase(card) + buff, skb->data, len); + } #ifndef PAGE0_ALWAYS_MAPPED openwin(card, 0); /* select pkt_desc table page back */ -- 2.8.1