From patchwork Sun May 30 06:24:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1695DC47091 for ; Sun, 30 May 2021 06:27:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE568610CC for ; Sun, 30 May 2021 06:27:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbhE3G3Z (ORCPT ); Sun, 30 May 2021 02:29:25 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:2104 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbhE3G3S (ORCPT ); Sun, 30 May 2021 02:29:18 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ft7db0W1szWqS5; Sun, 30 May 2021 14:22:59 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:37 +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; Sun, 30 May 2021 14:27:37 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 01/10] net: sealevel: remove redundant blank lines Date: Sun, 30 May 2021 14:24:25 +0800 Message-ID: <1622355874-18933-2-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li This patch removes some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 7dddc9dcbe23..62cc59892d1e 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -29,14 +29,12 @@ #include #include "z85230.h" - struct slvl_device { struct z8530_channel *chan; int channel; }; - struct slvl_board { struct slvl_device dev[2]; @@ -195,7 +193,6 @@ static int slvl_setup(struct slvl_device *sv, int iobase, int irq) return 0; } - /* * Allocate and setup Sealevel board. */ @@ -256,7 +253,6 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, outb(3 | (1 << 7), b->iobase + 4); - /* We want a fast IRQ for this device. Actually we'd like an even faster IRQ ;) - This is one driver RtLinux is made for */ @@ -351,7 +347,6 @@ static void __exit slvl_shutdown(struct slvl_board *b) kfree(b); } - static int io=0x238; static int txdma=1; static int rxdma=3; From patchwork Sun May 30 06:24:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450470 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2032BC47091 for ; Sun, 30 May 2021 06:27:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05FDE610CC for ; Sun, 30 May 2021 06:27:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229745AbhE3G3V (ORCPT ); Sun, 30 May 2021 02:29:21 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2542 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbhE3G3S (ORCPT ); Sun, 30 May 2021 02:29:18 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ft7gr1vsdzYrwW; Sun, 30 May 2021 14:24:56 +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; Sun, 30 May 2021 14:27:38 +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; Sun, 30 May 2021 14:27:37 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 02/10] net: sealevel: add blank line after declarations Date: Sun, 30 May 2021 14:24:26 +0800 Message-ID: <1622355874-18933-3-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 62cc59892d1e..829e9bc01a49 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -174,6 +174,7 @@ static const struct net_device_ops sealevel_ops = { static int slvl_setup(struct slvl_device *sv, int iobase, int irq) { struct net_device *dev = alloc_hdlcdev(sv); + if (!dev) return -1; @@ -334,6 +335,7 @@ static void __exit slvl_shutdown(struct slvl_board *b) for (u = 0; u < 2; u++) { struct net_device *d = b->dev[u].chan->netdevice; + unregister_hdlc_device(d); free_netdev(d); } From patchwork Sun May 30 06:24:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450784 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30E8BC47089 for ; Sun, 30 May 2021 06:27:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 118FB611CA for ; Sun, 30 May 2021 06:27:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbhE3G33 (ORCPT ); Sun, 30 May 2021 02:29:29 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2543 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbhE3G3S (ORCPT ); Sun, 30 May 2021 02:29:18 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ft7gr5P5PzYrwj; Sun, 30 May 2021 14:24:56 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:38 +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; Sun, 30 May 2021 14:27:38 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 03/10] net: sealevel: fix the code style issue about "foo* bar" Date: Sun, 30 May 2021 14:24:27 +0800 Message-ID: <1622355874-18933-4-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Fix the checkpatch error as "(foo*)" should be "(foo *)". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 829e9bc01a49..465c9ace1dc7 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -46,7 +46,7 @@ struct slvl_board * Network driver support routines */ -static inline struct slvl_device* dev_to_chan(struct net_device *dev) +static inline struct slvl_device *dev_to_chan(struct net_device *dev) { return (struct slvl_device *)dev_to_hdlc(dev)->priv; } From patchwork Sun May 30 06:24:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E5FC47091 for ; Sun, 30 May 2021 06:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0336610CC for ; Sun, 30 May 2021 06:27:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229761AbhE3G3W (ORCPT ); Sun, 30 May 2021 02:29:22 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2471 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229668AbhE3G3S (ORCPT ); Sun, 30 May 2021 02:29:18 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ft7gc0VZlz66hN; Sun, 30 May 2021 14:24:44 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:39 +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; Sun, 30 May 2021 14:27:38 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 04/10] net: sealevel: open brace '{' following struct go on the same line Date: Sun, 30 May 2021 14:24:28 +0800 Message-ID: <1622355874-18933-5-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Fix the checkpatch error as open brace '{' following struct should go on the same line. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 465c9ace1dc7..b484d1f7b176 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -29,14 +29,12 @@ #include #include "z85230.h" -struct slvl_device -{ +struct slvl_device { struct z8530_channel *chan; int channel; }; -struct slvl_board -{ +struct slvl_board { struct slvl_device dev[2]; struct z8530_dev board; int iobase; From patchwork Sun May 30 06:24:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E99C47093 for ; Sun, 30 May 2021 06:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B490610FC for ; Sun, 30 May 2021 06:27:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229789AbhE3G3Y (ORCPT ); Sun, 30 May 2021 02:29:24 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:2105 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbhE3G3S (ORCPT ); Sun, 30 May 2021 02:29:18 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ft7dc6Z83zWqSB; Sun, 30 May 2021 14:23:00 +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; Sun, 30 May 2021 14:27:39 +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; Sun, 30 May 2021 14:27:39 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 05/10] net: sealevel: add some required spaces Date: Sun, 30 May 2021 14:24:29 +0800 Message-ID: <1622355874-18933-6-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Add spaces required around that '='. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index b484d1f7b176..be618fd0b9a8 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -347,10 +347,10 @@ static void __exit slvl_shutdown(struct slvl_board *b) kfree(b); } -static int io=0x238; -static int txdma=1; -static int rxdma=3; -static int irq=5; +static int io = 0x238; +static int txdma = 1; +static int rxdma = 3; +static int irq = 5; static bool slow=false; module_param_hw(io, int, ioport, 0); From patchwork Sun May 30 06:24:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450468 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C57FC47092 for ; Sun, 30 May 2021 06:27:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 234B7610CC for ; Sun, 30 May 2021 06:27:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229825AbhE3G31 (ORCPT ); Sun, 30 May 2021 02:29:27 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:2411 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbhE3G3T (ORCPT ); Sun, 30 May 2021 02:29:19 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Ft7fl0ZNsz65V2; Sun, 30 May 2021 14:23:59 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:40 +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; Sun, 30 May 2021 14:27:39 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 06/10] net: sealevel: remove redundant initialization for statics Date: Sun, 30 May 2021 14:24:30 +0800 Message-ID: <1622355874-18933-7-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Should not initialise statics to false. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index be618fd0b9a8..d19e9024865f 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -351,7 +351,7 @@ static int io = 0x238; static int txdma = 1; static int rxdma = 3; static int irq = 5; -static bool slow=false; +static bool slow; module_param_hw(io, int, ioport, 0); MODULE_PARM_DESC(io, "The I/O base of the Sealevel card"); From patchwork Sun May 30 06:24:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6716BC47092 for ; Sun, 30 May 2021 06:27:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 436F6610CC for ; Sun, 30 May 2021 06:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbhE3G3d (ORCPT ); Sun, 30 May 2021 02:29:33 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3474 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbhE3G3T (ORCPT ); Sun, 30 May 2021 02:29:19 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ft7gt35SZzYrwn; Sun, 30 May 2021 14:24:58 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:40 +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; Sun, 30 May 2021 14:27:40 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 07/10] net: sealevel: fix a code style issue about switch and case Date: Sun, 30 May 2021 14:24:31 +0800 Message-ID: <1622355874-18933-8-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li According to the chackpatch.pl, switch and case should be at the same indent. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index d19e9024865f..e07309e0d971 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -79,12 +79,12 @@ static int sealevel_open(struct net_device *d) */ switch (unit) { - case 0: - err = z8530_sync_dma_open(d, slvl->chan); - break; - case 1: - err = z8530_sync_open(d, slvl->chan); - break; + case 0: + err = z8530_sync_dma_open(d, slvl->chan); + break; + case 1: + err = z8530_sync_open(d, slvl->chan); + break; } if (err) @@ -93,12 +93,12 @@ static int sealevel_open(struct net_device *d) err = hdlc_open(d); if (err) { switch (unit) { - case 0: - z8530_sync_dma_close(d, slvl->chan); - break; - case 1: - z8530_sync_close(d, slvl->chan); - break; + case 0: + z8530_sync_dma_close(d, slvl->chan); + break; + case 1: + z8530_sync_close(d, slvl->chan); + break; } return err; } @@ -127,12 +127,12 @@ static int sealevel_close(struct net_device *d) netif_stop_queue(d); switch (unit) { - case 0: - z8530_sync_dma_close(d, slvl->chan); - break; - case 1: - z8530_sync_close(d, slvl->chan); - break; + case 0: + z8530_sync_dma_close(d, slvl->chan); + break; + case 1: + z8530_sync_close(d, slvl->chan); + break; } return 0; } From patchwork Sun May 30 06:24:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 259DDC47091 for ; Sun, 30 May 2021 06:27:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A285610FC for ; Sun, 30 May 2021 06:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229867AbhE3G3a (ORCPT ); Sun, 30 May 2021 02:29:30 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2472 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbhE3G3T (ORCPT ); Sun, 30 May 2021 02:29:19 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Ft7gd4q5Dz68QJ; Sun, 30 May 2021 14:24:45 +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; Sun, 30 May 2021 14:27:40 +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; Sun, 30 May 2021 14:27:40 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 08/10] net: sealevel: remove meaningless comments Date: Sun, 30 May 2021 14:24:32 +0800 Message-ID: <1622355874-18933-9-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Remove the meaningless stylistically wrong comment. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index e07309e0d971..6665732f96ce 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -105,9 +105,6 @@ static int sealevel_open(struct net_device *d) slvl->chan->rx_function = sealevel_input; - /* - * Go go go - */ netif_start_queue(d); return 0; } From patchwork Sun May 30 06:24:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F0DAC47091 for ; Sun, 30 May 2021 06:28:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6069F610FC for ; Sun, 30 May 2021 06:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbhE3G3i (ORCPT ); Sun, 30 May 2021 02:29:38 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5147 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229721AbhE3G3U (ORCPT ); Sun, 30 May 2021 02:29:20 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ft7gv2kL2zYpTY; Sun, 30 May 2021 14:24:59 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:41 +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; Sun, 30 May 2021 14:27:40 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 09/10] net: sealevel: fix the comments style issue Date: Sun, 30 May 2021 14:24:33 +0800 Message-ID: <1622355874-18933-10-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Networking block comments don't use an empty /* line, use /* Comment... Block comments use * on subsequent lines. Block comments use a trailing */ on a separate line. This patch fixes the comments style issues. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 60 ++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 6665732f96ce..60028cfaaab5 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -/* - * Sealevel Systems 4021 driver. +/* Sealevel Systems 4021 driver. * * (c) Copyright 1999, 2001 Alan Cox * (c) Copyright 2001 Red Hat Inc. @@ -40,17 +39,14 @@ struct slvl_board { int iobase; }; -/* - * Network driver support routines - */ + /* Network driver support routines */ static inline struct slvl_device *dev_to_chan(struct net_device *dev) { return (struct slvl_device *)dev_to_hdlc(dev)->priv; } -/* - * Frame receive. Simple for our card as we do HDLC and there +/* Frame receive. Simple for our card as we do HDLC and there * is no funny garbage involved */ @@ -64,9 +60,7 @@ static void sealevel_input(struct z8530_channel *c, struct sk_buff *skb) netif_rx(skb); } -/* - * We've been placed in the UP state - */ + /* We've been placed in the UP state */ static int sealevel_open(struct net_device *d) { @@ -74,9 +68,7 @@ static int sealevel_open(struct net_device *d) int err = -1; int unit = slvl->channel; - /* - * Link layer up. - */ + /* Link layer up. */ switch (unit) { case 0: @@ -114,9 +106,7 @@ static int sealevel_close(struct net_device *d) struct slvl_device *slvl = dev_to_chan(d); int unit = slvl->channel; - /* - * Discard new frames - */ + /* Discard new frames */ slvl->chan->rx_function = z8530_null_rx; @@ -137,13 +127,12 @@ static int sealevel_close(struct net_device *d) static int sealevel_ioctl(struct net_device *d, struct ifreq *ifr, int cmd) { /* struct slvl_device *slvl=dev_to_chan(d); - z8530_ioctl(d,&slvl->sync.chanA,ifr,cmd) */ + * z8530_ioctl(d,&slvl->sync.chanA,ifr,cmd) + */ return hdlc_ioctl(d, ifr, cmd); } -/* - * Passed network frames, fire them downwind. - */ +/* Passed network frames, fire them downwind. */ static netdev_tx_t sealevel_queue_xmit(struct sk_buff *skb, struct net_device *d) @@ -189,9 +178,7 @@ static int slvl_setup(struct slvl_device *sv, int iobase, int irq) return 0; } -/* - * Allocate and setup Sealevel board. - */ +/* Allocate and setup Sealevel board. */ static __init struct slvl_board *slvl_init(int iobase, int irq, int txdma, int rxdma, int slow) @@ -199,9 +186,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, struct z8530_dev *dev; struct slvl_board *b; - /* - * Get the needed I/O space - */ + /* Get the needed I/O space */ if (!request_region(iobase, 8, "Sealevel 4021")) { pr_warn("I/O 0x%X already in use\n", iobase); @@ -220,17 +205,13 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, dev = &b->board; - /* - * Stuff in the I/O addressing - */ + /* Stuff in the I/O addressing */ dev->active = 0; b->iobase = iobase; - /* - * Select 8530 delays for the old board - */ + /* Select 8530 delays for the old board */ if (slow) iobase |= Z8530_PORT_SLEEP; @@ -243,14 +224,13 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, dev->chanA.irqs = &z8530_nop; dev->chanB.irqs = &z8530_nop; - /* - * Assert DTR enable DMA - */ + /* Assert DTR enable DMA */ outb(3 | (1 << 7), b->iobase + 4); /* We want a fast IRQ for this device. Actually we'd like an even faster - IRQ ;) - This is one driver RtLinux is made for */ + * IRQ ;) - This is one driver RtLinux is made for + */ if (request_irq(irq, z8530_interrupt, 0, "SeaLevel", dev) < 0) { @@ -274,9 +254,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, disable_irq(irq); - /* - * Begin normal initialise - */ + /* Begin normal initialise */ if (z8530_init(dev) != 0) { pr_err("Z8530 series device not found\n"); @@ -291,9 +269,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, z8530_channel_load(&dev->chanB, z8530_hdlc_kilostream_85230); } - /* - * Now we can take the IRQ - */ + /* Now we can take the IRQ */ enable_irq(irq); From patchwork Sun May 30 06:24:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "huangguangbin \(A\)" X-Patchwork-Id: 450466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4366EC47095 for ; Sun, 30 May 2021 06:28:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22075610CC for ; Sun, 30 May 2021 06:28:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbhE3G3f (ORCPT ); Sun, 30 May 2021 02:29:35 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:2106 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbhE3G3U (ORCPT ); Sun, 30 May 2021 02:29:20 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ft7df6ddwzWqS7; Sun, 30 May 2021 14:23:02 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 30 May 2021 14:27:41 +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; Sun, 30 May 2021 14:27:41 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 10/10] net: sealevel: fix the alignment issue Date: Sun, 30 May 2021 14:24:34 +0800 Message-ID: <1622355874-18933-11-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> References: <1622355874-18933-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Peng Li Alignment should match open parenthesis. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/sealevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 60028cfaaab5..4403e219ca03 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -135,7 +135,7 @@ static int sealevel_ioctl(struct net_device *d, struct ifreq *ifr, int cmd) /* Passed network frames, fire them downwind. */ static netdev_tx_t sealevel_queue_xmit(struct sk_buff *skb, - struct net_device *d) + struct net_device *d) { return z8530_queue_xmit(dev_to_chan(d)->chan, skb); }