All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] tty: serial: Fix some coding style issues
@ 2021-05-18  1:57 Jay Fang
  2021-05-18  1:57 ` [PATCH 01/11] tty: serial: 21285: Fix some coding sytle issues Jay Fang
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

This patchset fixes some coding style issues reported by checkpatch.pl.

Zihao Tang (11):
  tty: serial: 21285: Fix some coding sytle issues
  tty: serial: amba-pl010: Fix 2 coding style issues
  tty: serial: amba-pl011: Replace the unsuitable spaces with tabs
  tty: serial: amba-pl011: Remove initialization of static variable
  tty: serial: apbuart: Fix some coding sytle issues
  tty: serial: atmel: Fix some coding style issues
  tty: serial: bcm63xx_uart: Fix some coding style issues
  tty: serial: clps711x: Fix some coding style issuses
  tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned'
  tty: serial: dz: Use 'unsigned int' instead of 'unsigned'
  tty: serial: earlycon-arm-semihost : Fix some coding style issuses

 drivers/tty/serial/21285.c                 |  7 +++----
 drivers/tty/serial/amba-pl010.c            |  4 ++--
 drivers/tty/serial/amba-pl011.c            | 12 ++++++------
 drivers/tty/serial/apbuart.c               |  5 ++++-
 drivers/tty/serial/atmel_serial.c          | 13 +++++++++----
 drivers/tty/serial/bcm63xx_uart.c          | 14 +++++++++-----
 drivers/tty/serial/clps711x.c              |  4 ++--
 drivers/tty/serial/digicolor-usart.c       |  2 +-
 drivers/tty/serial/dz.c                    |  4 ++--
 drivers/tty/serial/earlycon-arm-semihost.c |  3 ++-
 10 files changed, 40 insertions(+), 28 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 01/11] tty: serial: 21285: Fix some coding sytle issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 02/11] tty: serial: amba-pl010: Fix 2 coding style issues Jay Fang
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

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 <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 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
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 02/11] tty: serial: amba-pl010: Fix 2 coding style issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
  2021-05-18  1:57 ` [PATCH 01/11] tty: serial: 21285: Fix some coding sytle issues Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 03/11] tty: serial: amba-pl011: Replace the unsuitable spaces with tabs Jay Fang
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix the following 2 coding style issues reported by checkpatch.pl:

  ERROR: trailing whitespace
  #387: FILE: ./drivers/tty/serial/amba-pl010.c:387

  ERROR: Macros with complex values should be enclosed in parentheses
  #676: FILE: ./drivers/tty/serial/amba-pl010.c:676

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/tty/serial/amba-pl010.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c
index e744b95..b12ad58 100644
--- a/drivers/tty/serial/amba-pl010.c
+++ b/drivers/tty/serial/amba-pl010.c
@@ -384,7 +384,7 @@ pl010_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, uap->port.uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	switch (termios->c_cflag & CSIZE) {
@@ -673,7 +673,7 @@ static struct console amba_console = {
 	.data		= &amba_reg,
 };
 
-#define AMBA_CONSOLE	&amba_console
+#define AMBA_CONSOLE	(&amba_console)
 #else
 #define AMBA_CONSOLE	NULL
 #endif
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 03/11] tty: serial: amba-pl011: Replace the unsuitable spaces with tabs
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
  2021-05-18  1:57 ` [PATCH 01/11] tty: serial: 21285: Fix some coding sytle issues Jay Fang
  2021-05-18  1:57 ` [PATCH 02/11] tty: serial: amba-pl010: Fix 2 coding style issues Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 04/11] tty: serial: amba-pl011: Remove initialization of static variable Jay Fang
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

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 <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 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);
 }
 
 /*
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 04/11] tty: serial: amba-pl011: Remove initialization of static variable
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (2 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 03/11] tty: serial: amba-pl011: Replace the unsuitable spaces with tabs Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 05/11] tty: serial: apbuart: Fix some coding sytle issues Jay Fang
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix the following checkpatch errors:

ERROR: do not initialise statics to false
+	static bool seen_dev_with_alias = false;

ERROR: do not initialise statics to false
+	static bool seen_dev_without_alias = false;

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/tty/serial/amba-pl011.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 2a63e70..0da824b 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2531,8 +2531,8 @@ static struct uart_driver amba_reg = {
 static int pl011_probe_dt_alias(int index, struct device *dev)
 {
 	struct device_node *np;
-	static bool seen_dev_with_alias = false;
-	static bool seen_dev_without_alias = false;
+	static bool seen_dev_with_alias;
+	static bool seen_dev_without_alias;
 	int ret = index;
 
 	if (!IS_ENABLED(CONFIG_OF))
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 05/11] tty: serial: apbuart: Fix some coding sytle issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (3 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 04/11] tty: serial: amba-pl011: Remove initialization of static variable Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 06/11] tty: serial: atmel: Fix some coding style issues Jay Fang
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix 4 coding style warnings reported by checkpatch.pl.

There is 1 "labels should not be indented" warning, and the
remaining 3 warnings are "Missing a blank line after declarations".

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/tty/serial/apbuart.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index d8c937b..196b571 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -113,7 +113,7 @@ static void apbuart_rx_chars(struct uart_port *port)
 		uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag);
 
 
-	      ignore_char:
+ignore_char:
 		status = UART_GET_STATUS(port);
 	}
 
@@ -175,6 +175,7 @@ static irqreturn_t apbuart_int(int irq, void *dev_id)
 static unsigned int apbuart_tx_empty(struct uart_port *port)
 {
 	unsigned int status = UART_GET_STATUS(port);
+
 	return status & UART_STATUS_THE ? TIOCSER_TEMT : 0;
 }
 
@@ -311,6 +312,7 @@ static int apbuart_verify_port(struct uart_port *port,
 			       struct serial_struct *ser)
 {
 	int ret = 0;
+
 	if (ser->type != PORT_UNKNOWN && ser->type != PORT_APBUART)
 		ret = -EINVAL;
 	if (ser->irq < 0 || ser->irq >= NR_IRQS)
@@ -416,6 +418,7 @@ static void apbuart_flush_fifo(struct uart_port *port)
 static void apbuart_console_putchar(struct uart_port *port, int ch)
 {
 	unsigned int status;
+
 	do {
 		status = UART_GET_STATUS(port);
 	} while (!UART_TX_READY(status));
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 06/11] tty: serial: atmel: Fix some coding style issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (4 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 05/11] tty: serial: apbuart: Fix some coding sytle issues Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 07/11] tty: serial: bcm63xx_uart: " Jay Fang
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

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 <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 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) {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 07/11] tty: serial: bcm63xx_uart: Fix some coding style issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (5 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 06/11] tty: serial: atmel: Fix some coding style issues Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 08/11] tty: serial: clps711x: Fix some coding style issuses Jay Fang
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix 5 coding style warings reported by checkpatch.pl.

Fix 4 "WARNING: Block comments use a trailing */ on a separate line".
Fix 1 "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'".

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/tty/serial/bcm63xx_uart.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 5fb0e84..76e2ab6 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -231,21 +231,24 @@ static void bcm_uart_do_rx(struct uart_port *port)
 
 	/* limit number of char read in interrupt, should not be
 	 * higher than fifo size anyway since we're much faster than
-	 * serial port */
+	 * serial port
+	 */
 	max_count = 32;
 	do {
 		unsigned int iestat, c, cstat;
 		char flag;
 
 		/* get overrun/fifo empty information from ier
-		 * register */
+		 * register
+		 */
 		iestat = bcm_uart_readl(port, UART_IR_REG);
 
 		if (unlikely(iestat & UART_IR_STAT(UART_IR_RXOVER))) {
 			unsigned int val;
 
 			/* fifo reset is required to clear
-			 * interrupt */
+			 * interrupt
+			 */
 			val = bcm_uart_readl(port, UART_CTL_REG);
 			val |= UART_CTL_RSTRXFIFO_MASK;
 			bcm_uart_writel(port, val, UART_CTL_REG);
@@ -424,7 +427,8 @@ static void bcm_uart_flush(struct uart_port *port)
 	bcm_uart_writel(port, val, UART_CTL_REG);
 
 	/* read any pending char to make sure all irq status are
-	 * cleared */
+	 * cleared
+	 */
 	(void)bcm_uart_readl(port, UART_FIFO_REG);
 }
 
@@ -764,7 +768,7 @@ static int __init bcm63xx_console_init(void)
 
 console_initcall(bcm63xx_console_init);
 
-static void bcm_early_write(struct console *con, const char *s, unsigned n)
+static void bcm_early_write(struct console *con, const char *s, unsigned int n)
 {
 	struct earlycon_device *dev = con->data;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 08/11] tty: serial: clps711x: Fix some coding style issuses
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (6 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 07/11] tty: serial: bcm63xx_uart: " Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 09/11] tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned' Jay Fang
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix the following checkpatch warnings:

  WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
  #365: FILE: ./drivers/tty/serial/clps711x.c:365:
  +					unsigned n)

  WARNING: suspect code indent for conditional statements (8, 12)
  #486: FILE: ./drivers/tty/serial/clps711x.c:486:
  +	if (IS_ERR(s->gpios))
  +	    return PTR_ERR(s->gpios);

  WARNING: Statements should start on a tabstop
  #487: FILE: ./drivers/tty/serial/clps711x.c:487:
  +	    return PTR_ERR(s->gpios);

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/tty/serial/clps711x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index 95abc6f..3a7a76c 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -362,7 +362,7 @@ static void uart_clps711x_console_putchar(struct uart_port *port, int ch)
 }
 
 static void uart_clps711x_console_write(struct console *co, const char *c,
-					unsigned n)
+					unsigned int n)
 {
 	struct uart_port *port = clps711x_uart.state[co->index].uart_port;
 	struct clps711x_port *s = dev_get_drvdata(port->dev);
@@ -484,7 +484,7 @@ static int uart_clps711x_probe(struct platform_device *pdev)
 
 	s->gpios = mctrl_gpio_init_noauto(&pdev->dev, 0);
 	if (IS_ERR(s->gpios))
-	    return PTR_ERR(s->gpios);
+		return PTR_ERR(s->gpios);
 
 	ret = uart_add_one_port(&clps711x_uart, &s->port);
 	if (ret)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 09/11] tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned'
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (7 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 08/11] tty: serial: clps711x: Fix some coding style issuses Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 10/11] tty: serial: dz: " Jay Fang
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

Fix the following checkpatch warnings:

  WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
  #393: FILE: ./drivers/tty/serial/digicolor-usart.c:393:
  +					 unsigned n)

Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 drivers/tty/serial/digicolor-usart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c
index 13ac36e..e26afd8 100644
--- a/drivers/tty/serial/digicolor-usart.c
+++ b/drivers/tty/serial/digicolor-usart.c
@@ -390,7 +390,7 @@ static void digicolor_uart_console_putchar(struct uart_port *port, int ch)
 }
 
 static void digicolor_uart_console_write(struct console *co, const char *c,
-					 unsigned n)
+					 unsigned int n)
 {
 	struct uart_port *port = digicolor_ports[co->index];
 	u8 status;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 10/11] tty: serial: dz: Use 'unsigned int' instead of 'unsigned'
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (8 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 09/11] tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned' Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  1:57 ` [PATCH 11/11] tty: serial: earlycon-arm-semihost : Fix some coding style issuses Jay Fang
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

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 <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 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;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 11/11] tty: serial: earlycon-arm-semihost : Fix some coding style issuses
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (9 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 10/11] tty: serial: dz: " Jay Fang
@ 2021-05-18  1:57 ` Jay Fang
  2021-05-18  5:39 ` [PATCH 00/11] tty: serial: Fix some coding style issues Greg KH
  2021-05-21  8:56 ` Johan Hovold
  12 siblings, 0 replies; 14+ messages in thread
From: Jay Fang @ 2021-05-18  1:57 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

From: Zihao Tang <tangzihao1@hisilicon.com>

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 <tangzihao1@hisilicon.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
---
 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);
 }
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 00/11] tty: serial: Fix some coding style issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (10 preceding siblings ...)
  2021-05-18  1:57 ` [PATCH 11/11] tty: serial: earlycon-arm-semihost : Fix some coding style issuses Jay Fang
@ 2021-05-18  5:39 ` Greg KH
  2021-05-21  8:56 ` Johan Hovold
  12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2021-05-18  5:39 UTC (permalink / raw)
  To: Jay Fang; +Cc: linux-serial, linuxarm, huangdaode, tangzihao1

On Tue, May 18, 2021 at 09:57:07AM +0800, Jay Fang wrote:
> From: Zihao Tang <tangzihao1@hisilicon.com>
> 
> This patchset fixes some coding style issues reported by checkpatch.pl.
> 
> Zihao Tang (11):
>   tty: serial: 21285: Fix some coding sytle issues
>   tty: serial: amba-pl010: Fix 2 coding style issues
>   tty: serial: amba-pl011: Replace the unsuitable spaces with tabs
>   tty: serial: amba-pl011: Remove initialization of static variable
>   tty: serial: apbuart: Fix some coding sytle issues
>   tty: serial: atmel: Fix some coding style issues
>   tty: serial: bcm63xx_uart: Fix some coding style issues
>   tty: serial: clps711x: Fix some coding style issuses
>   tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned'
>   tty: serial: dz: Use 'unsigned int' instead of 'unsigned'
>   tty: serial: earlycon-arm-semihost : Fix some coding style issuses
> 
>  drivers/tty/serial/21285.c                 |  7 +++----
>  drivers/tty/serial/amba-pl010.c            |  4 ++--
>  drivers/tty/serial/amba-pl011.c            | 12 ++++++------
>  drivers/tty/serial/apbuart.c               |  5 ++++-
>  drivers/tty/serial/atmel_serial.c          | 13 +++++++++----
>  drivers/tty/serial/bcm63xx_uart.c          | 14 +++++++++-----
>  drivers/tty/serial/clps711x.c              |  4 ++--
>  drivers/tty/serial/digicolor-usart.c       |  2 +-
>  drivers/tty/serial/dz.c                    |  4 ++--
>  drivers/tty/serial/earlycon-arm-semihost.c |  3 ++-
>  10 files changed, 40 insertions(+), 28 deletions(-)
> 
> -- 
> 2.7.4
> 


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 00/11] tty: serial: Fix some coding style issues
  2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
                   ` (11 preceding siblings ...)
  2021-05-18  5:39 ` [PATCH 00/11] tty: serial: Fix some coding style issues Greg KH
@ 2021-05-21  8:56 ` Johan Hovold
  12 siblings, 0 replies; 14+ messages in thread
From: Johan Hovold @ 2021-05-21  8:56 UTC (permalink / raw)
  To: Jay Fang; +Cc: gregkh, linux-serial, linuxarm, huangdaode, tangzihao1

On Tue, May 18, 2021 at 09:57:07AM +0800, Jay Fang wrote:
> From: Zihao Tang <tangzihao1@hisilicon.com>
> 
> This patchset fixes some coding style issues reported by checkpatch.pl.

Please don't send (checkpatch) style cleanups for code outside of
staging unless you're also doing some real changes to the code in
question as this only makes it harder to do code forensics and backport
fixes for no good reason.

Some more discussion can be found here:

	https://lore.kernel.org/r/YKYcFfKiHT39Gyey@hovoldconsulting.com

> Zihao Tang (11):
>   tty: serial: 21285: Fix some coding sytle issues
>   tty: serial: amba-pl010: Fix 2 coding style issues
>   tty: serial: amba-pl011: Replace the unsuitable spaces with tabs
>   tty: serial: amba-pl011: Remove initialization of static variable
>   tty: serial: apbuart: Fix some coding sytle issues
>   tty: serial: atmel: Fix some coding style issues
>   tty: serial: bcm63xx_uart: Fix some coding style issues
>   tty: serial: clps711x: Fix some coding style issuses
>   tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned'
>   tty: serial: dz: Use 'unsigned int' instead of 'unsigned'
>   tty: serial: earlycon-arm-semihost : Fix some coding style issuses

Johan

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-05-21  8:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18  1:57 [PATCH 00/11] tty: serial: Fix some coding style issues Jay Fang
2021-05-18  1:57 ` [PATCH 01/11] tty: serial: 21285: Fix some coding sytle issues Jay Fang
2021-05-18  1:57 ` [PATCH 02/11] tty: serial: amba-pl010: Fix 2 coding style issues Jay Fang
2021-05-18  1:57 ` [PATCH 03/11] tty: serial: amba-pl011: Replace the unsuitable spaces with tabs Jay Fang
2021-05-18  1:57 ` [PATCH 04/11] tty: serial: amba-pl011: Remove initialization of static variable Jay Fang
2021-05-18  1:57 ` [PATCH 05/11] tty: serial: apbuart: Fix some coding sytle issues Jay Fang
2021-05-18  1:57 ` [PATCH 06/11] tty: serial: atmel: Fix some coding style issues Jay Fang
2021-05-18  1:57 ` [PATCH 07/11] tty: serial: bcm63xx_uart: " Jay Fang
2021-05-18  1:57 ` [PATCH 08/11] tty: serial: clps711x: Fix some coding style issuses Jay Fang
2021-05-18  1:57 ` [PATCH 09/11] tty: serial: digicolor: Use 'unsigned int' instead of 'unsigned' Jay Fang
2021-05-18  1:57 ` [PATCH 10/11] tty: serial: dz: " Jay Fang
2021-05-18  1:57 ` [PATCH 11/11] tty: serial: earlycon-arm-semihost : Fix some coding style issuses Jay Fang
2021-05-18  5:39 ` [PATCH 00/11] tty: serial: Fix some coding style issues Greg KH
2021-05-21  8:56 ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.