16 NANDS
Thomas Gleixner
tglx at linutronix.de
Wed Jan 8 15:23:57 EST 2003
On Wednesday 08 January 2003 09:14, David Woodhouse wrote:
> tglx at linutronix.de said:
> > The functions are not that different, but it's better to have a
> > little duplicated code instead of if (buswitdh == x) then else....
> > crap.
>
> Bear in mind that if/then/else crap can be hidden inside #defines fairly
> effectively, and optimises away perfectly in the case where you compile for
> only one buswidth -- unlike out-of-line function calls.
>
> What Nico did with cfi_read() et al is worth considering.
I have the option already built in to compile for one buswidth only, but if
you want to compile it for 8/16/32 3 different functions give you more code,
but also more speed and more flexibility for code maintainence
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de
More information about the linux-mtd
mailing list