lkml.org 
[lkml]   [2014]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] tty: serial: 8250_mtk: Add earlycon
Date
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


\
 
 \ /
  Last update: 2014-12-18 10:41    [W:0.917 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site