Skip to content

Commit de03eaa

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 822f94f commit de03eaa

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

drivers/tty/serial/apbuart.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
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

1416
#include <linux/module.h>
@@ -112,8 +114,7 @@ static void apbuart_rx_chars(struct uart_port *port)
112114

113115
uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag);
114116

115-
116-
ignore_char:
117+
ignore_char:
117118
status = UART_GET_STATUS(port);
118119
}
119120

@@ -177,6 +178,7 @@ static irqreturn_t apbuart_int(int irq, void *dev_id)
177178
static unsigned int apbuart_tx_empty(struct uart_port *port)
178179
{
179180
unsigned int status = UART_GET_STATUS(port);
181+
180182
return status & UART_STATUS_THE ? TIOCSER_TEMT : 0;
181183
}
182184

@@ -313,6 +315,7 @@ static int apbuart_verify_port(struct uart_port *port,
313315
struct serial_struct *ser)
314316
{
315317
int ret = 0;
318+
316319
if (ser->type != PORT_UNKNOWN && ser->type != PORT_APBUART)
317320
ret = -EINVAL;
318321
if (ser->irq < 0 || ser->irq >= NR_IRQS)
@@ -418,6 +421,7 @@ static void apbuart_flush_fifo(struct uart_port *port)
418421
static void apbuart_console_putchar(struct uart_port *port, int ch)
419422
{
420423
unsigned int status;
424+
421425
do {
422426
status = UART_GET_STATUS(port);
423427
} while (!UART_TX_READY(status));
@@ -454,6 +458,7 @@ apbuart_console_get_options(struct uart_port *port, int *baud,
454458
if (UART_GET_CTRL(port) & (UART_CTRL_RE | UART_CTRL_TE)) {
455459

456460
unsigned int quot, status;
461+
457462
status = UART_GET_STATUS(port);
458463

459464
*parity = 'n';
@@ -618,15 +623,17 @@ static int __init grlib_apbuart_configure(void)
618623
port = &grlib_apbuart_ports[line];
619624

620625
port->mapbase = addr;
621-
port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
626+
port->membase = ioremap(addr,
627+
sizeof(struct grlib_apbuart_regs_map));
622628
port->irq = 0;
623629
port->iotype = UPIO_MEM;
624630
port->ops = &grlib_apbuart_ops;
625631
port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE);
626632
port->flags = UPF_BOOT_AUTOCONF;
627633
port->line = line;
628634
port->uartclk = *freq_hz;
629-
port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line);
635+
port->fifosize = apbuart_scan_fifo_size(
636+
(struct uart_port *) port, line);
630637
line++;
631638

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

0 commit comments

Comments
 (0)