linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 8/21] [POWERPC] EP405 boards support for arch/powerpc
Date: Sat, 22 Dec 2007 11:01:09 +1100	[thread overview]
Message-ID: <1198281669.6737.24.camel@pasglop> (raw)
In-Reply-To: <20071222102424.bc96d03c.sfr@canb.auug.org.au>


On Sat, 2007-12-22 at 10:24 +1100, Stephen Rothwell wrote:

> > +++ linux-merge/arch/powerpc/boot/4xx.c	2007-12-21 14:19:46.000000000 +1100
> > @@ -179,13 +179,16 @@ void ibm40x_dbcr_reset(void)
> >  #define EMAC_RESET 0x20000000
> >  void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
> >  {
> > -	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
> > +	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't
> > +	 * do this for us
> > +	 */
> >  	if (emac0)
> >  		*emac0 = EMAC_RESET;
> >  	if (emac1)
> >  		*emac1 = EMAC_RESET;
> >  
> >  	mtdcr(DCRN_MAL0_CFG, MAL_RESET);
> > +	while (mfdcr(DCRN_MAL0_CFG) & MAL_RESET) {};
> 
> You need the {} or the ; but not both and please put them indented on the
> next line so that it is very clear that this is an empty loop.

Code was copy/pasted from somewhere else... we can always do a fixup
later.

> > +	if (cpc0_cr0 & 0x80) {
> > +		/* uart0 uses the external clock */
> > +		uart0 = ser_clk;
> > +	} else {
> > +		uart0 = cpu / udiv;
> > +	}
> 
> The braces aren't really needed. (Yes, I noticed that you just moved the
> code here)

Yup :-)

> > +	if (cpc0_cr0 & 0x40) {
> > +		/* uart1 uses the external clock */
> > +		uart1 = ser_clk;
> > +	} else {
> > +		uart1 = cpu / udiv;
> > +	}
> 
> And again.

I'd rather do cleanups separately. I won't send new patches until I'm
back from vacation so Josh, if you want to fix those little nits up,
feel free.

> > +++ linux-merge/arch/powerpc/platforms/40x/ep405.c	2007-12-21 14:19:46.000000000 +1100
> > +
> > +static struct of_device_id ep405_of_bus[] = {
> 
> __initdata (preferably) or const

Ben.

      parent reply	other threads:[~2007-12-22  0:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  4:39 [PATCH 8/21] [POWERPC] EP405 boards support for arch/powerpc Benjamin Herrenschmidt
2007-12-21 23:24 ` Stephen Rothwell
2007-12-21 23:55   ` Josh Boyer
2007-12-22  0:01   ` Benjamin Herrenschmidt [this message]

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=1198281669.6737.24.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).