[U-Boot] [PATCH] Improve output of bootm command

Mike Frysinger vapier at gentoo.org
Sun Sep 11 22:17:14 CEST 2011


On Sunday, September 11, 2011 16:13:26 Andrew Murray wrote:
> On 11 September 2011 20:22, Mike Frysinger <vapier at gentoo.org> wrote:
> > On Saturday, September 10, 2011 10:57:47 Andrew Murray wrote:
> > > --- a/common/cmd_bootm.c
> > > +++ b/common/cmd_bootm.c
> > > 
> > >               if (load == blob_start || load == image_start) {
> > >                       ..........
> > > -             } else {
> > > +             } else if (load != image_start) {
> > 
> > sorry, but why does this new if() make any sense ?  the only way this
> > else branch could execute is if load != image_start since load ==
> > image_start was
> > explicitly handled in the first if check.
> 
> Yes that's correct. The move is executed and a print statement displayed -
> only when the load address differs from the image start address. In other
> words the patch prevents unnecessary/confusing output and a call to a
> function that doesn't do anything when load == image_start.

i think you missed my point.  your proposed change to the "else" branch makes 
no difference to the existing code.

current code:
if (load == image_start) {
	...
} else {
	...
}

your new code:
if (load == image_start) {
	...
} else if (load != image_start) {
	...
}

your change to the if statement is pointless ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110911/30f82804/attachment.pgp 


More information about the U-Boot mailing list