Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1699039pxj; Sat, 5 Jun 2021 00:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUrk4+Hc4FKn1Jt/Zy82FFgHgEzngZdyrWzCeCNaWSp3vxNmgwHtmR+gKW1OmeGi8oUgxo X-Received: by 2002:a17:906:6899:: with SMTP id n25mr8070971ejr.462.1622876913713; Sat, 05 Jun 2021 00:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622876913; cv=none; d=google.com; s=arc-20160816; b=QPZGBIoKRH6SLXLgWl8DUcyta1dm9yEeBIw2SinZRPWCqIiXQspzYcs7J8+di0JoiK mqZRSVdR9fFmIG2Q5YnmZWmjUR45iJtxcpXqb1u8nrXLLr0LT87V9t5/cK572y4yo2w8 7riZ4wyhk3kWN0imebJAdo11yfIJRlD42lsFyOHUpZ1ski+Q97+mkbPWcMmVUXM397KY Nd6ZsiIBwBbkmA0X40DIxkw77Hxmeyd5MyGcsorXUgWmSBntOwW+CaqVSrThPekyVpqn wPl6GUQFnjHX+F4QIIpcYfjDzvlr6WoWvnfP2R6HbyPNM19fxzQfgaJPBhxBVO8jqcGe BPyQ== 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=193ItQBZUzMZsDXm+Gq9acSqp8Dio86dnlOZ9Ypz4lo=; b=DalJV2ONXjEW78GCHbDAZK8R/LVP+NoGPz/VILL1uCs2jt2rTgBJjvQBjlN6rLnT4M kCUfYqz9i1XKbXOOxC1icLGyDCnRUTCTTyYpg0aoiun58mOL1Gy5yn34zmS7BVjKRjBC Buq6YTKS1a2p6hi67IR/znqGnT8fNtjjjWzm14iiKfcSkl/P/UuDDGhk0TP0eZA8q55F u4MqDq4z3Ub+PwKMmM4LhcflF+XYnMwZ+vKO8U01WhdgRbhS2m1cZATm8WFiu8s1oQxn pI7jP5JIK1I3y9KmAVCKSv2jH4v8n0gdVJni4wRs/tNmJehSMFDqf9YSPag6JvPVIdDM WU4g== 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 j3si4950567ejj.516.2021.06.05.00.08.11; Sat, 05 Jun 2021 00:08:33 -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 S230051AbhFEHF1 (ORCPT + 99 others); Sat, 5 Jun 2021 03:05:27 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:4314 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbhFEHFZ (ORCPT ); Sat, 5 Jun 2021 03:05:25 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Fxr886q40z1BGSn; Sat, 5 Jun 2021 14:58:48 +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:34 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 4/8] net: hd64570: fix the code style issue about trailing statements Date: Sat, 5 Jun 2021 15:00:25 +0800 Message-ID: <1622876429-47278-5-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 Trailing statements should be on next line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/hd64570.c | 60 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 6237da6..f02cce0 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -58,12 +58,18 @@ static inline int sca_intr_status(card_t *card) u8 isr0 = sca_in(ISR0, card); u8 isr1 = sca_in(ISR1, card); - if (isr1 & 0x03) result |= SCA_INTR_DMAC_RX(0); - if (isr1 & 0x0C) result |= SCA_INTR_DMAC_TX(0); - if (isr1 & 0x30) result |= SCA_INTR_DMAC_RX(1); - if (isr1 & 0xC0) result |= SCA_INTR_DMAC_TX(1); - if (isr0 & 0x0F) result |= SCA_INTR_MSCI(0); - if (isr0 & 0xF0) result |= SCA_INTR_MSCI(1); + if (isr1 & 0x03) + result |= SCA_INTR_DMAC_RX(0); + if (isr1 & 0x0C) + result |= SCA_INTR_DMAC_TX(0); + if (isr1 & 0x30) + result |= SCA_INTR_DMAC_RX(1); + if (isr1 & 0xC0) + result |= SCA_INTR_DMAC_TX(1); + if (isr0 & 0x0F) + result |= SCA_INTR_MSCI(0); + if (isr0 & 0xF0) + result |= SCA_INTR_MSCI(1); if (!(result & SCA_INTR_DMAC_TX(0))) if (sca_in(DSR_TX(0), card) & DSR_EOM) @@ -447,23 +453,41 @@ static void sca_open(struct net_device *dev) u16 msci = get_msci(port); u8 md0, md2; - switch(port->encoding) { - case ENCODING_NRZ: md2 = MD2_NRZ; break; - case ENCODING_NRZI: md2 = MD2_NRZI; break; - case ENCODING_FM_MARK: md2 = MD2_FM_MARK; break; - case ENCODING_FM_SPACE: md2 = MD2_FM_SPACE; break; - default: md2 = MD2_MANCHESTER; + switch (port->encoding) { + case ENCODING_NRZ: + md2 = MD2_NRZ; + break; + case ENCODING_NRZI: + md2 = MD2_NRZI; + break; + case ENCODING_FM_MARK: + md2 = MD2_FM_MARK; + break; + case ENCODING_FM_SPACE: + md2 = MD2_FM_SPACE; + break; + default: + md2 = MD2_MANCHESTER; } if (port->settings.loopback) md2 |= MD2_LOOPBACK; - switch(port->parity) { - case PARITY_CRC16_PR0: md0 = MD0_HDLC | MD0_CRC_16_0; break; - case PARITY_CRC16_PR1: md0 = MD0_HDLC | MD0_CRC_16; break; - case PARITY_CRC16_PR0_CCITT: md0 = MD0_HDLC | MD0_CRC_ITU_0; break; - case PARITY_CRC16_PR1_CCITT: md0 = MD0_HDLC | MD0_CRC_ITU; break; - default: md0 = MD0_HDLC | MD0_CRC_NONE; + switch (port->parity) { + case PARITY_CRC16_PR0: + md0 = MD0_HDLC | MD0_CRC_16_0; + break; + case PARITY_CRC16_PR1: + md0 = MD0_HDLC | MD0_CRC_16; + break; + case PARITY_CRC16_PR0_CCITT: + md0 = MD0_HDLC | MD0_CRC_ITU_0; + break; + case PARITY_CRC16_PR1_CCITT: + md0 = MD0_HDLC | MD0_CRC_ITU; + break; + default: + md0 = MD0_HDLC | MD0_CRC_NONE; } sca_out(CMD_RESET, msci + CMD, card); -- 2.8.1