Re: [PATCH 1/2] tty: serial: 8250_mtk: Add earlycon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 18 December 2014 09:48:31 Matthias Brugger wrote:
> > +static void __init mtk8250_serial_putc(struct uart_port *port, int c)
> > +{
> > +       while ((readl(port->membase + (UART_LSR << 2)) & BOTH_EMPTY) !=
> > +               BOTH_EMPTY)
> > +               ;
> 
> Please delete newline before the semicolon.
> 

No, that newline is best kept in there for clarity. An even better way
to write this would be using cpu_relax():

	while ((readl(port->membase + (UART_LSR << 2)) & BOTH_EMPTY) != BOTH_EMPTY)
		cpu_relax();

which the kernel convention for doing busy-loops.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux