From patchwork Tue May 18 01:57:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 441620 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 788DFC433B4 for ; Tue, 18 May 2021 01:57:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 507C0613B9 for ; Tue, 18 May 2021 01:57:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346158AbhERB6o (ORCPT ); Mon, 17 May 2021 21:58:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3002 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbhERB6n (ORCPT ); Mon, 17 May 2021 21:58:43 -0400 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FkfDh4rMQzQpBY; Tue, 18 May 2021 09:53:56 +0800 (CST) Received: from dggeme758-chm.china.huawei.com (10.3.19.104) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 18 May 2021 09:57:25 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme758-chm.china.huawei.com (10.3.19.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 18 May 2021 09:57:25 +0800 From: Jay Fang To: CC: , , , Subject: [PATCH 01/11] tty: serial: 21285: Fix some coding sytle issues Date: Tue, 18 May 2021 09:57:08 +0800 Message-ID: <1621303038-12062-2-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> References: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme758-chm.china.huawei.com (10.3.19.104) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Zihao Tang Fix the following coding style issues reported by checkpatch.pl: ERROR: trailing whitespace #265: FILE: ./drivers/tty/serial/21285.c:265: +^Ibaud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); $ ERROR: that open brace { should be on the previous line #483: FILE: ./drivers/tty/serial/21285.c:483: +static struct console serial21285_console = +{ ERROR: Macros with complex values should be enclosed in parentheses #501: FILE: ./drivers/tty/serial/21285.c:501: +#define SERIAL_21285_CONSOLE &serial21285_console Signed-off-by: Zihao Tang Signed-off-by: Jay Fang --- drivers/tty/serial/21285.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c index 09baef4..bb323a7 100644 --- a/drivers/tty/serial/21285.c +++ b/drivers/tty/serial/21285.c @@ -262,7 +262,7 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios, /* * Ask the core to calculate the divisor for us. */ - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); + baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); quot = uart_get_divisor(port, baud); b = port->uartclk / (16 * quot); tty_termios_encode_baud_rate(termios, b, b); @@ -479,8 +479,7 @@ static int __init serial21285_console_setup(struct console *co, char *options) static struct uart_driver serial21285_reg; -static struct console serial21285_console = -{ +static struct console serial21285_console = { .name = SERIAL_21285_NAME, .write = serial21285_console_write, .device = uart_console_device, @@ -498,7 +497,7 @@ static int __init rs285_console_init(void) } console_initcall(rs285_console_init); -#define SERIAL_21285_CONSOLE &serial21285_console +#define SERIAL_21285_CONSOLE (&serial21285_console) #else #define SERIAL_21285_CONSOLE NULL #endif From patchwork Tue May 18 01:57:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 441617 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 E896BC43603 for ; Tue, 18 May 2021 01:57:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC0DA613BE for ; Tue, 18 May 2021 01:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237984AbhERB6q (ORCPT ); Mon, 17 May 2021 21:58:46 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:2956 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245659AbhERB6o (ORCPT ); Mon, 17 May 2021 21:58:44 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FkfFX1dC6zCtHX; Tue, 18 May 2021 09:54:40 +0800 (CST) Received: from dggeme758-chm.china.huawei.com (10.3.19.104) 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; Tue, 18 May 2021 09:57:25 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme758-chm.china.huawei.com (10.3.19.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 18 May 2021 09:57:25 +0800 From: Jay Fang To: CC: , , , Subject: [PATCH 03/11] tty: serial: amba-pl011: Replace the unsuitable spaces with tabs Date: Tue, 18 May 2021 09:57:10 +0800 Message-ID: <1621303038-12062-4-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> References: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme758-chm.china.huawei.com (10.3.19.104) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Zihao Tang Replace the unsuitable spaces at the start of a line reported by checkpatch.pl with tabs: WARNING: please, no spaces at the start of a line #1813: FILE: ./drivers/tty/serial/amba-pl011.c:1813: + unsigned long val;$ WARNING: please, no spaces at the start of a line #1815: FILE: ./drivers/tty/serial/amba-pl011.c:1815: + val = pl011_read(uap, lcrh);$ WARNING: please, no spaces at the start of a line #1816: FILE: ./drivers/tty/serial/amba-pl011.c:1816: + val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN);$ WARNING: please, no spaces at the start of a line #1817: FILE: ./drivers/tty/serial/amba-pl011.c:1817: + pl011_write(val, uap, lcrh);$ Signed-off-by: Zihao Tang Signed-off-by: Jay Fang --- drivers/tty/serial/amba-pl011.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 78682c1..2a63e70 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1810,11 +1810,11 @@ static int sbsa_uart_startup(struct uart_port *port) static void pl011_shutdown_channel(struct uart_amba_port *uap, unsigned int lcrh) { - unsigned long val; + unsigned long val; - val = pl011_read(uap, lcrh); - val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN); - pl011_write(val, uap, lcrh); + val = pl011_read(uap, lcrh); + val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN); + pl011_write(val, uap, lcrh); } /* From patchwork Tue May 18 01:57:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 441619 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 6E266C43470 for ; Tue, 18 May 2021 01:57:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43B19613BA for ; Tue, 18 May 2021 01:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346162AbhERB6p (ORCPT ); Mon, 17 May 2021 21:58:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4721 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241532AbhERB6o (ORCPT ); Mon, 17 May 2021 21:58:44 -0400 Received: from dggems703-chm.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FkfDj6vK0zmhpj; Tue, 18 May 2021 09:53:57 +0800 (CST) Received: from dggeme758-chm.china.huawei.com (10.3.19.104) by dggems703-chm.china.huawei.com (10.3.19.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 18 May 2021 09:57:26 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme758-chm.china.huawei.com (10.3.19.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 18 May 2021 09:57:25 +0800 From: Jay Fang To: CC: , , , Subject: [PATCH 06/11] tty: serial: atmel: Fix some coding style issues Date: Tue, 18 May 2021 09:57:13 +0800 Message-ID: <1621303038-12062-7-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> References: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme758-chm.china.huawei.com (10.3.19.104) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Zihao Tang Fix some coding style warnings reported by checkpatch.pl. Fix 4 "Block comments use a trailing */ on a separate line" warnings. Fix 1 "Block comments use * on subsequent lines" warning. Fix 1 "Block comments use * on subsequent lines" warning. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang --- drivers/tty/serial/atmel_serial.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 058886d..5d4675f 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -60,7 +60,8 @@ static void atmel_stop_rx(struct uart_port *port); /* Use device name ttyAT, major 204 and minor 154-169. This is necessary if we * should coexist with the 8250 driver, such as if we have an external 16C550 - * UART. */ + * UART. + */ #define SERIAL_ATMEL_MAJOR 204 #define MINOR_START 154 #define ATMEL_DEVICENAME "ttyAT" @@ -68,7 +69,8 @@ static void atmel_stop_rx(struct uart_port *port); #else /* Use device name ttyS, major 4, minor 64-68. This is the usual serial port - * name, but it is legally reserved for the 8250 driver. */ + * name, but it is legally reserved for the 8250 driver. + */ #define SERIAL_ATMEL_MAJOR TTY_MAJOR #define MINOR_START 64 #define ATMEL_DEVICENAME "ttyS" @@ -582,7 +584,8 @@ static void atmel_start_tx(struct uart_port *port) if (atmel_use_pdc_tx(port) && (atmel_uart_readl(port, ATMEL_PDC_PTSR) & ATMEL_PDC_TXTEN)) /* The transmitter is already running. Yes, we - really need this.*/ + * really need this. + */ return; if (atmel_use_pdc_tx(port) || atmel_use_dma_tx(port)) @@ -2399,6 +2402,7 @@ static void atmel_config_port(struct uart_port *port, int flags) static int atmel_verify_port(struct uart_port *port, struct serial_struct *ser) { int ret = 0; + if (ser->type != PORT_UNKNOWN && ser->type != PORT_ATMEL) ret = -EINVAL; if (port->irq != ser->irq) @@ -2837,7 +2841,8 @@ static int atmel_serial_probe(struct platform_device *pdev) ret = of_alias_get_id(np, "serial"); if (ret < 0) /* port id not found in platform data nor device-tree aliases: - * auto-enumerate it */ + * auto-enumerate it + */ ret = find_first_zero_bit(atmel_ports_in_use, ATMEL_MAX_UART); if (ret >= ATMEL_MAX_UART) { From patchwork Tue May 18 01:57:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 441615 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 1B838C43617 for ; Tue, 18 May 2021 01:57:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0128613BB for ; Tue, 18 May 2021 01:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346153AbhERB6r (ORCPT ); Mon, 17 May 2021 21:58:47 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4722 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346159AbhERB6p (ORCPT ); Mon, 17 May 2021 21:58:45 -0400 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FkfDk4Q6mzmhpn; Tue, 18 May 2021 09:53:58 +0800 (CST) Received: from dggeme758-chm.china.huawei.com (10.3.19.104) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 18 May 2021 09:57:26 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme758-chm.china.huawei.com (10.3.19.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 18 May 2021 09:57:26 +0800 From: Jay Fang To: CC: , , , Subject: [PATCH 10/11] tty: serial: dz: Use 'unsigned int' instead of 'unsigned' Date: Tue, 18 May 2021 09:57:17 +0800 Message-ID: <1621303038-12062-11-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> References: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme758-chm.china.huawei.com (10.3.19.104) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Zihao Tang Fix 2 "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" warnings reported by checkpatch.pl: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #99: FILE: ./drivers/tty/serial/dz.c:99: +static u16 dz_in(struct dz_port *dport, unsigned offset) WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #106: FILE: ./drivers/tty/serial/dz.c:106: +static void dz_out(struct dz_port *dport, unsigned offset, u16 value) Signed-off-by: Zihao Tang Signed-off-by: Jay Fang --- drivers/tty/serial/dz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/dz.c b/drivers/tty/serial/dz.c index 4552742..5ba26d2 100644 --- a/drivers/tty/serial/dz.c +++ b/drivers/tty/serial/dz.c @@ -96,14 +96,14 @@ static inline struct dz_port *to_dport(struct uart_port *uport) * ------------------------------------------------------------ */ -static u16 dz_in(struct dz_port *dport, unsigned offset) +static u16 dz_in(struct dz_port *dport, unsigned int offset) { void __iomem *addr = dport->port.membase + offset; return readw(addr); } -static void dz_out(struct dz_port *dport, unsigned offset, u16 value) +static void dz_out(struct dz_port *dport, unsigned int offset, u16 value) { void __iomem *addr = dport->port.membase + offset; From patchwork Tue May 18 01:57:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Fang X-Patchwork-Id: 441616 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 BD6CFC43616 for ; Tue, 18 May 2021 01:57:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A017E613B9 for ; Tue, 18 May 2021 01:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346146AbhERB6q (ORCPT ); Mon, 17 May 2021 21:58:46 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3573 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346161AbhERB6p (ORCPT ); Mon, 17 May 2021 21:58:45 -0400 Received: from dggems704-chm.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FkfFZ1nm7zmVG6; Tue, 18 May 2021 09:54:42 +0800 (CST) Received: from dggeme758-chm.china.huawei.com (10.3.19.104) by dggems704-chm.china.huawei.com (10.3.19.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 18 May 2021 09:57:26 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme758-chm.china.huawei.com (10.3.19.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 18 May 2021 09:57:26 +0800 From: Jay Fang To: CC: , , , Subject: [PATCH 11/11] tty: serial: earlycon-arm-semihost : Fix some coding style issuses Date: Tue, 18 May 2021 09:57:18 +0800 Message-ID: <1621303038-12062-12-git-send-email-f.fangjian@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> References: <1621303038-12062-1-git-send-email-f.fangjian@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggeme758-chm.china.huawei.com (10.3.19.104) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Zihao Tang Fix the following checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #39: FILE: ./drivers/tty/serial/earlycon-arm-semihost.c:39: +static void smh_write(struct console *con, const char *s, unsigned n) WARNING: Missing a blank line after declarations #42: FILE: ./drivers/tty/serial/earlycon-arm-semihost.c:42: + struct earlycon_device *dev = con->data; + uart_console_write(&dev->port, s, n, smh_putc); Signed-off-by: Zihao Tang Signed-off-by: Jay Fang --- drivers/tty/serial/earlycon-arm-semihost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/earlycon-arm-semihost.c b/drivers/tty/serial/earlycon-arm-semihost.c index fa096c1..3db23c3 100644 --- a/drivers/tty/serial/earlycon-arm-semihost.c +++ b/drivers/tty/serial/earlycon-arm-semihost.c @@ -36,9 +36,10 @@ static void smh_putc(struct uart_port *port, int c) #endif } -static void smh_write(struct console *con, const char *s, unsigned n) +static void smh_write(struct console *con, const char *s, unsigned int n) { struct earlycon_device *dev = con->data; + uart_console_write(&dev->port, s, n, smh_putc); }