Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3490551pxj; Mon, 24 May 2021 07:56:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykoC7o91/h5EfSlW6Gu3Dkt6E7PqIgqFv+zGN0rNYgeUNxON5Wzo1HvH5jBL7SBXDy1AWZ X-Received: by 2002:a5d:9e0b:: with SMTP id h11mr16429662ioh.60.1621868186911; Mon, 24 May 2021 07:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621868186; cv=none; d=google.com; s=arc-20160816; b=WCl1gxXzz47dpuidhbCPZj5nBQtUsMHx2SZmBhbCHarGrlYQQIlecg3izYMRa8m1wR AbE+jkRuAwmnINJeqdgIfgcxCo26RqnARkirWnGkj8+OXEMBXowdQBpAXpR8kSceKZmN CugJXvm3Dz9Vkq2eGGCXeIj0WS70IWynX0hcZB2osagdKhj8Q4lnnF8h/g/0rMUlxtYF 8O/v76kcTTv9IU8BoWzTUGxVAw6Oj2GTyBNGh9SfaNCpumBaKk2fbUXDyocWC1GX2Iq8 peHI0GHIhf3U9A9qhYe47GkGhTZVJ7XyB21tW2FZgbkcGkc5gUcj2KeU7tSp1IbgL/zN IDYg== 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=Ep0ef7witWPhcOlBHDxDWoQLj+JkBBJC3OpPr6fORUA=; b=JQlViMjHb7qK4msqItJkfD4wSTGy0RjyQMPnw8YO5pZYvVAeL7xXQmu4QXcrNlalnr LYRtqLn0TEDJikr9CULHn6pAHPOg8XX+y48M+L8btWXnd+blUjRn3JtPL24Jv7tIETsk VfEom4GUJ7t7D1xcQJmkId7AgGLBBrdnWGL/g6Yy0k4X6By1a/Q3v1Wo6izUo+ePzrQP eeGBT+BfVEJxkLNtWDTc+rzRDUxtbau1b/DaHo0xaN1l7AIKZTW7iFoSQnm3HE7XwfzP UFiLH7gbi2vnUapEkKfyZDXYQUWkd0j4lQq529aHGc/PNWjYAkK5R4U5TnqXBt/Yih5G U47A== 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 v30si15064260jal.60.2021.05.24.07.56.13; Mon, 24 May 2021 07:56:26 -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 S233703AbhEXO5D (ORCPT + 99 others); Mon, 24 May 2021 10:57:03 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5762 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbhEXOvy (ORCPT ); Mon, 24 May 2021 10:51:54 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Fpg5b0V5nzmkcm; Mon, 24 May 2021 22:46:43 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Mon, 24 May 2021 22:50:18 +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; Mon, 24 May 2021 22:50:17 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 05/10] net: wan: fix the code style issue about trailing statements Date: Mon, 24 May 2021 22:47:12 +0800 Message-ID: <1621867637-2680-6-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1621867637-2680-1-git-send-email-huangguangbin2@huawei.com> References: <1621867637-2680-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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/wanxl.c | 59 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 0bcb21ddcc62..7e5bf207a142 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -112,21 +112,45 @@ static inline void wanxl_cable_intr(struct port *port) const char *cable, *pm, *dte = "", *dsr = "", *dcd = ""; switch(value & 0x7) { - case STATUS_CABLE_V35: cable = "V.35"; break; - case STATUS_CABLE_X21: cable = "X.21"; break; - case STATUS_CABLE_V24: cable = "V.24"; break; - case STATUS_CABLE_EIA530: cable = "EIA530"; break; - case STATUS_CABLE_NONE: cable = "no"; break; - default: cable = "invalid"; + case STATUS_CABLE_V35: + cable = "V.35"; + break; + case STATUS_CABLE_X21: + cable = "X.21"; + break; + case STATUS_CABLE_V24: + cable = "V.24"; + break; + case STATUS_CABLE_EIA530: + cable = "EIA530"; + break; + case STATUS_CABLE_NONE: + cable = "no"; + break; + default: + cable = "invalid"; } switch((value >> STATUS_CABLE_PM_SHIFT) & 0x7) { - case STATUS_CABLE_V35: pm = "V.35"; break; - case STATUS_CABLE_X21: pm = "X.21"; break; - case STATUS_CABLE_V24: pm = "V.24"; break; - case STATUS_CABLE_EIA530: pm = "EIA530"; break; - case STATUS_CABLE_NONE: pm = "no personality"; valid = 0; break; - default: pm = "invalid personality"; valid = 0; + case STATUS_CABLE_V35: + pm = "V.35"; + break; + case STATUS_CABLE_X21: + pm = "X.21"; + break; + case STATUS_CABLE_V24: + pm = "V.24"; + break; + case STATUS_CABLE_EIA530: + pm = "EIA530"; + break; + case STATUS_CABLE_NONE: + pm = "no personality"; + valid = 0; + break; + default: + pm = "invalid personality"; + valid = 0; } if (valid) { @@ -563,9 +587,14 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, } switch (pdev->device) { - case PCI_DEVICE_ID_SBE_WANXL100: ports = 1; break; - case PCI_DEVICE_ID_SBE_WANXL200: ports = 2; break; - default: ports = 4; + case PCI_DEVICE_ID_SBE_WANXL100: + ports = 1; + break; + case PCI_DEVICE_ID_SBE_WANXL200: + ports = 2; + break; + default: + ports = 4; } card = kzalloc(struct_size(card, ports, ports), GFP_KERNEL); -- 2.8.1