[U-Boot] [PATCH] cmd_bdinfo: move implementation to arch instead of common

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Thu Nov 13 09:15:26 CET 2008


Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> wrote:
> >This patch trades off the removal of most of the #ifdef ugly for  
> > a lot of duplication.  Which is the lesser of two evils?  
> Only 4 archs share actually the same code avr32, i386, mips and sh
> which actually I've plan to modify for sh soon

And the avr32 code is mostly wrong. So it looks like the current
situation is #ifdef mess _and_ duplication. This patch definitely
improves things.

The reason why the avr32 part is wrong is that I simply didn't notice
that I had to do anything in there until quite recently. So IMO making
this thing arch-specific will make it easier to get it right for new
architectures (since you'll get a nice and friendly link error
reminding you that you missed it.)

Haavard


More information about the U-Boot mailing list