public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] tty: serial: 8250_mtk: Add earlycon
Date: Thu, 18 Dec 2014 10:12:33 +0100	[thread overview]
Message-ID: <1822504.xkcBG8sz41@wuerfel> (raw)
In-Reply-To: <CABuKBe+dki5ab8PexMhq36AJFCBk_dBifV86F8FKsF_es1cmJA@mail.gmail.com>

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

  reply	other threads:[~2014-12-18  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18  8:33 [PATCH 0/2] tty: serial: Add earlycon support to MT8173 SoC Eddie Huang
2014-12-18  8:33 ` [PATCH 1/2] tty: serial: 8250_mtk: Add earlycon Eddie Huang
2014-12-18  8:48   ` Matthias Brugger
2014-12-18  9:12     ` Arnd Bergmann [this message]
2014-12-26 21:24   ` Rob Herring
2014-12-29  4:24     ` Eddie Huang
2014-12-29 14:54       ` Rob Herring
2014-12-29 19:08       ` Arnd Bergmann
2014-12-18  8:33 ` [PATCH 2/2] arm64: dts: Add mediatek MT8173 earlycon support Eddie Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1822504.xkcBG8sz41@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox