public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamie Iles <jamie@jamieiles.com>
To: John Linn <John.Linn@xilinx.com>
Cc: Jamie Iles <jamie@jamieiles.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux@arm.linux.org.uk,
	catalin.marinas@arm.com, glikely@secretlab.ca, arnd@arndb.de
Subject: Re: [PATCH V4 3/4] ARM: Xilinx: base header files and assembly macros
Date: Mon, 28 Feb 2011 15:01:49 +0000	[thread overview]
Message-ID: <20110228150149.GG2754@pulham.picochip.com> (raw)
In-Reply-To: <0f644016-95cf-4fcb-853d-fb20bee31908@VA3EHSMHS013.ehs.local>

On Mon, Feb 28, 2011 at 07:20:32AM -0700, John Linn wrote:
[...]
> > > +
> > > +static inline void flush(void)
> > > +{
> > > +	u32 status;
> > > +	/*
> > > +	 * Wait while the FIFO is not empty
> > > +	 */
> > > +	while (1) {
> > > +		status = __raw_readl(IOMEM(LL_UART_PADDR +
> UART_SR_OFFSET));
> > > +		if (status & UART_SR_TXEMPTY)
> > > +			break;
> > > +		cpu_relax();
> > > +	}
> > 
> > This could be written as:
> > 
> > static inline void flush(void)
> > {
> > 	while (!(__raw_readl(IOMEM(LL_UART_PADDR + UART_SR_OFFSET)) &
> > 		 UART_SR_TXEMPTY))
> > 		 cpu_relax();
> > }
> 
> Honestly I had it that way as I know most in the community do that and
> terse-ness is somewhat preferred.
> 
> I thought my way is a bit clearer as it was a bit harder to read the
> other way.
> 
> Do you think everyone else would say to change it?  No big deal to
> change it.

I guess it's largely down to personal preference.  Personally I find the 
infinite loop with conditional break harder to read but then I'm not 
going to the the primary maintainer ;-)

Jamie

  reply	other threads:[~2011-02-28 15:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1298052881-14591-1-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14 ` [PATCH V4 1/4] ARM: Xilinx: Adding Xilinx board support John Linn
2011-02-28 11:06   ` Jamie Iles
2011-02-28 14:13     ` John Linn
     [not found] ` <1298052881-14591-2-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14   ` [PATCH V4 2/4] ARM: Xilinx: Adding timer support to the platform John Linn
2011-02-28 11:11     ` Jamie Iles
2011-02-28 14:14       ` John Linn
     [not found]   ` <1298052881-14591-3-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14     ` [PATCH V4 3/4] ARM: Xilinx: base header files and assembly macros John Linn
2011-02-20 21:37       ` Arnd Bergmann
2011-02-21  0:18         ` John Linn
2011-02-21  8:36           ` Arnd Bergmann
2011-02-21 14:36             ` John Linn
2011-02-21 14:48               ` Arnd Bergmann
2011-02-21 15:04                 ` John Linn
2011-02-21 15:17                 ` Russell King - ARM Linux
2011-02-21 21:08                   ` CLOCK_TICK_RATE, was: " Arnd Bergmann
2011-02-21 21:51                     ` Thomas Gleixner
2011-02-28 11:18       ` Jamie Iles
2011-02-28 14:20         ` John Linn
2011-02-28 15:01           ` Jamie Iles [this message]
2011-02-28 11:20       ` Russell King - ARM Linux
2011-02-28 14:22         ` [PATCH V4 3/4] ARM: Xilinx: base header files and assemblymacros John Linn
     [not found]     ` <1298052881-14591-4-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14       ` [PATCH V4 4/4] ARM: Xilinx: Adding Xilinx platform infrastructure support John Linn

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=20110228150149.GG2754@pulham.picochip.com \
    --to=jamie@jamieiles.com \
    --cc=John.Linn@xilinx.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=glikely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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