Skip to content

Commit

Permalink
drivers: tty: serial: timbuart: fix formatting issues
Browse files Browse the repository at this point in the history
Fix checkpatch warnings:

    WARNING: Missing a blank line after declarations
    torvalds#43: FILE: drivers/tty/serial/timbuart.c:43:
    +	u32 ier = ioread32(port->membase + TIMBUART_IER) & ~RXFLAGS;
    +	iowrite32(ier, port->membase + TIMBUART_IER);

    WARNING: Missing a blank line after declarations
    torvalds#50: FILE: drivers/tty/serial/timbuart.c:50:
    +	u32 ier = ioread32(port->membase + TIMBUART_IER) & ~TXBAE;
    +	iowrite32(ier, port->membase + TIMBUART_IER);

    WARNING: Missing a blank line after declarations
    torvalds#86: FILE: drivers/tty/serial/timbuart.c:86:
    +		u8 ch = ioread8(port->membase + TIMBUART_RXFIFO);
    +		port->icount.rx++;

    WARNING: Missing a blank line after declarations
    torvalds#202: FILE: drivers/tty/serial/timbuart.c:202:
    +	u8 cts = ioread8(port->membase + TIMBUART_CTRL);
    +	dev_dbg(port->dev, "%s - cts %x\n", __func__, cts);

    WARNING: Block comments use * on subsequent lines
    torvalds#296: FILE: drivers/tty/serial/timbuart.c:296:
    +	/* The serial layer calls into this once with old = NULL when setting
    +	   up initially */

    WARNING: Block comments use a trailing */ on a separate line
    torvalds#296: FILE: drivers/tty/serial/timbuart.c:296:

Signed-off-by: Enrico Weigelt <info@metux.net>
  • Loading branch information
metux committed Apr 30, 2019
1 parent 76bd4a7 commit cb58af4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/tty/serial/timbuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ static void timbuart_stop_rx(struct uart_port *port)
{
/* spin lock held by upper layer, disable all RX interrupts */
u32 ier = ioread32(port->membase + TIMBUART_IER) & ~RXFLAGS;

iowrite32(ier, port->membase + TIMBUART_IER);
}

static void timbuart_stop_tx(struct uart_port *port)
{
/* spinlock held by upper layer, disable TX interrupt */
u32 ier = ioread32(port->membase + TIMBUART_IER) & ~TXBAE;

iowrite32(ier, port->membase + TIMBUART_IER);
}

Expand Down Expand Up @@ -83,6 +85,7 @@ static void timbuart_rx_chars(struct uart_port *port)

while (ioread32(port->membase + TIMBUART_ISR) & RXDP) {
u8 ch = ioread8(port->membase + TIMBUART_RXFIFO);

port->icount.rx++;
tty_insert_flip_char(tport, ch, TTY_NORMAL);
}
Expand Down Expand Up @@ -199,6 +202,7 @@ static void timbuart_tasklet(unsigned long arg)
static unsigned int timbuart_get_mctrl(struct uart_port *port)
{
u8 cts = ioread8(port->membase + TIMBUART_CTRL);

dev_dbg(port->dev, "%s - cts %x\n", __func__, cts);

if (cts & TIMBUART_CTRL_CTS)
Expand Down Expand Up @@ -293,7 +297,8 @@ static void timbuart_set_termios(struct uart_port *port,
baud = baudrates[bindex];

/* The serial layer calls into this once with old = NULL when setting
up initially */
* up initially
*/
if (old)
tty_termios_copy_hw(termios, old);
tty_termios_encode_baud_rate(termios, baud, baud);
Expand Down Expand Up @@ -500,4 +505,3 @@ module_platform_driver(timbuart_platform_driver);
MODULE_DESCRIPTION("Timberdale UART driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:timb-uart");

0 comments on commit cb58af4

Please sign in to comment.