Dear Troy Kisky, In message <[email protected]> you wrote: > > > Could you please elucidate why exactly this is _needed_? > > My goal was to reduce the number of static variables, but strictly speaking > it has little benefit other than giving me a warm fuzzy feeling. > > I'm not that only one that dislikes static though. ... > ds is on the stack, and even if not needed now, I like to avoid future > random bugs.
Did you check the impact of your changes on the memory footprint? Changing code that uses a static variable initialized (implicitly or explicitly) to zero [which results in allocation of the BSS segment, i. e. zero space in the code or in the image file] into real code is something that is a bit of expensive just for satisfying random "dislikes". I think you should better leave that as is. The code is pretty efficent that way, and you increase it for little or no benefit. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] The nice thing about standards is that there are so many to choose from. - Andrew S. Tanenbaum _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

