[U-Boot] [PATCH][v3] mpc8308_p1m: support for MPC8308 P1M board

Scott Wood scottwood at freescale.com
Mon Sep 20 18:18:52 CEST 2010


On Sat, 18 Sep 2010 22:35:54 +0200
Wolfgang Denk <wd at denx.de> wrote:

> > > +++ b/board/mpc8308_p1m/config.mk
> > > @@ -0,0 +1 @@
> > > +TEXT_BASE = 0xFC000000
> > 
> > ifndef TEXT_BASE
> > TEXT_BASE = 0xFC000000
> > endif
> 
> Why?

It might have been already set to something else by nand_spl or
similar.

> > > +int board_eth_init(bd_t *bis)
> > > +{
> > > +	int rv, num_if = 0;
> > > +
> > > +	/* Initialize TSECs first */
> > > +	if ((rv = cpu_eth_init(bis)) >= 0)
> > 
> > no assignments in if statements.
> 
> Why?

It could just as easily, and more readably, be written as:

rv = cpu_eth_init(bis);
if (rv >= 0)
	...

FWIW, Linux's checkpatch.pl looks for this and calls it an error, and
U-Boot says it follows Linux coding style.

-Scott



More information about the U-Boot mailing list