All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] net: Adds Fast Ethernet Controller driver for Armada100
Date: Thu, 25 Aug 2011 14:15:00 +0200	[thread overview]
Message-ID: <201108251415.00681.marek.vasut@gmail.com> (raw)
In-Reply-To: <316561839.535.1314249685865.JavaMail.root@ahm.einfochips.com>

On Thursday, August 25, 2011 07:21:25 AM Ajay Bhargav wrote:
> ----- "Marek Vasut" <marek.vasut@gmail.com> wrote:
> > On Wednesday, August 24, 2011 03:07:18 PM Ajay Bhargav wrote:
> > > This patch adds support for Fast Ethernet Controller driver for
> > > Armada100 series.
> > > 
> > > Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
> > > ---
> > 
> > [...]
> 
> [...]
> 
> > > +
> > > +static int armdfec_phy_timeout(u32 reg, u32 flag, int cond)
> > > +{
> > > +	u32 timeout = PHY_WAIT_ITERATIONS;
> > > +	while (--timeout) {
> > > +		if (cond && (readl(reg) & flag))
> > > +			break;
> > > +		else if (!cond && !(readl(reg) & flag))
> > 
> > You can read the register into some temporary variable so you don't
> > need the
> > readl() at two places.
> 
> readl will be called only once... do i really need a temp var?
> 

I think it'll help the readability a bit.

Cheers

  reply	other threads:[~2011-08-25 12:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <569776325.496.1314249408394.JavaMail.root@ahm.einfochips.com>
2011-08-25  5:21 ` [U-Boot] [PATCH v2 1/3] net: Adds Fast Ethernet Controller driver for Armada100 Ajay Bhargav
2011-08-25 12:15   ` Marek Vasut [this message]
     [not found] <1826454834.6634.1314336622428.JavaMail.root@ahm.einfochips.com>
2011-08-26  5:33 ` Ajay Bhargav
     [not found] <583672539.2717.1314270415380.JavaMail.root@ahm.einfochips.com>
2011-08-25 11:07 ` Ajay Bhargav
2011-08-25 12:19   ` Marek Vasut
2011-08-25 12:12     ` Ajay Bhargav
2011-08-24 13:07 Ajay Bhargav
2011-08-24 15:42 ` Mike Frysinger
2011-08-24 16:38   ` Marek Vasut
2011-08-25  5:24     ` Ajay Bhargav
2011-08-25 12:14       ` Marek Vasut
2011-08-25  5:10   ` Ajay Bhargav
2011-08-25 14:13     ` Mike Frysinger
2011-08-24 16:36 ` Marek Vasut

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=201108251415.00681.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.