Skip to content

Commit f06fd7e

Browse files
committed
drivers: tty: serial: apbuart: fix code formatting
Fix checkpatch warnings: WARNING: line over 80 characters torvalds#9: FILE: drivers/tty/serial/apbuart.c:9: + * Copyright (C) 2006 Daniel Hellstrom <daniel@gaisler.com>, Aeroflex Gaisler AB WARNING: line over 80 characters torvalds#11: FILE: drivers/tty/serial/apbuart.c:11: + * Copyright (C) 2009 Kristoffer Glembo <kristoffer@gaisler.com>, Aeroflex Gaisler AB WARNING: line over 80 characters torvalds#16: FILE: drivers/tty/serial/apbuart.c:16: +#if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) WARNING: labels should not be indented torvalds#122: FILE: drivers/tty/serial/apbuart.c:122: + ignore_char: WARNING: Missing a blank line after declarations torvalds#186: FILE: drivers/tty/serial/apbuart.c:186: + unsigned int status = UART_GET_STATUS(port); + return status & UART_STATUS_THE ? TIOCSER_TEMT : 0; WARNING: Missing a blank line after declarations torvalds#322: FILE: drivers/tty/serial/apbuart.c:322: + int ret = 0; + if (ser->type != PORT_UNKNOWN && ser->type != PORT_APBUART) WARNING: Missing a blank line after declarations torvalds#427: FILE: drivers/tty/serial/apbuart.c:427: + unsigned int status; + do { WARNING: Missing a blank line after declarations torvalds#463: FILE: drivers/tty/serial/apbuart.c:463: + unsigned int quot, status; + status = UART_GET_STATUS(port); WARNING: line over 80 characters torvalds#627: FILE: drivers/tty/serial/apbuart.c:627: + port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); WARNING: line over 80 characters torvalds#634: FILE: drivers/tty/serial/apbuart.c:634: + port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line); Signed-off-by: Enrico Weigelt <info@metux.net>
1 parent 8e53bed commit f06fd7e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

drivers/tty/serial/apbuart.c

+15-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
*
77
* Copyright (C) 2000 Deep Blue Solutions Ltd.
88
* Copyright (C) 2003 Konrad Eisele <eiselekd@web.de>
9-
* Copyright (C) 2006 Daniel Hellstrom <daniel@gaisler.com>, Aeroflex Gaisler AB
9+
* Copyright (C) 2006 Daniel Hellstrom <daniel@gaisler.com>,
10+
* Aeroflex Gaisler AB
1011
* Copyright (C) 2008 Gilead Kutnick <kutnickg@zin-tech.com>
11-
* Copyright (C) 2009 Kristoffer Glembo <kristoffer@gaisler.com>, Aeroflex Gaisler AB
12+
* Copyright (C) 2009 Kristoffer Glembo <kristoffer@gaisler.com>,
13+
* Aeroflex Gaisler AB
1214
*/
1315

14-
#if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
16+
#if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) \
17+
&& defined(CONFIG_MAGIC_SYSRQ)
1518
#define SUPPORT_SYSRQ
1619
#endif
1720

@@ -116,8 +119,7 @@ static void apbuart_rx_chars(struct uart_port *port)
116119

117120
uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag);
118121

119-
120-
ignore_char:
122+
ignore_char:
121123
status = UART_GET_STATUS(port);
122124
}
123125

@@ -181,6 +183,7 @@ static irqreturn_t apbuart_int(int irq, void *dev_id)
181183
static unsigned int apbuart_tx_empty(struct uart_port *port)
182184
{
183185
unsigned int status = UART_GET_STATUS(port);
186+
184187
return status & UART_STATUS_THE ? TIOCSER_TEMT : 0;
185188
}
186189

@@ -317,6 +320,7 @@ static int apbuart_verify_port(struct uart_port *port,
317320
struct serial_struct *ser)
318321
{
319322
int ret = 0;
323+
320324
if (ser->type != PORT_UNKNOWN && ser->type != PORT_APBUART)
321325
ret = -EINVAL;
322326
if (ser->irq < 0 || ser->irq >= NR_IRQS)
@@ -422,6 +426,7 @@ static void apbuart_flush_fifo(struct uart_port *port)
422426
static void apbuart_console_putchar(struct uart_port *port, int ch)
423427
{
424428
unsigned int status;
429+
425430
do {
426431
status = UART_GET_STATUS(port);
427432
} while (!UART_TX_READY(status));
@@ -458,6 +463,7 @@ apbuart_console_get_options(struct uart_port *port, int *baud,
458463
if (UART_GET_CTRL(port) & (UART_CTRL_RE | UART_CTRL_TE)) {
459464

460465
unsigned int quot, status;
466+
461467
status = UART_GET_STATUS(port);
462468

463469
*parity = 'n';
@@ -622,14 +628,16 @@ static int __init grlib_apbuart_configure(void)
622628
port = &grlib_apbuart_ports[line];
623629

624630
port->mapbase = addr;
625-
port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
631+
port->membase = ioremap(addr,
632+
sizeof(struct grlib_apbuart_regs_map));
626633
port->irq = 0;
627634
port->iotype = UPIO_MEM;
628635
port->ops = &grlib_apbuart_ops;
629636
port->flags = UPF_BOOT_AUTOCONF;
630637
port->line = line;
631638
port->uartclk = *freq_hz;
632-
port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line);
639+
port->fifosize = apbuart_scan_fifo_size(
640+
(struct uart_port *) port, line);
633641
line++;
634642

635643
/* We support maximum UART_NR uarts ... */

0 commit comments

Comments
 (0)