On Thursday, August 25, 2011 07:21:25 AM Ajay Bhargav wrote:
> ----- "Marek Vasut" <marek.va...@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.bhar...@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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to