karsten wiese wrote:
Ok, thats not much, but it dosn't harm either.
Erm,  at least as long as UHCI_NUMFRAMES is a power of 2
;-)

-       framenum %= UHCI_NUMFRAMES;
+       framenum &= (UHCI_NUMFRAMES - 1);

This seems like it should really be handled by the compiler... Did you try a more recent gcc, or looked at the assembler generated?


IMHO if the compiler does what it is supposed to do, then the compiled binary should be the same. If we change the value of UHCI_NUMFRAMES in the future to something that is not a power of 2, this code won't break, whereas in your version, it will.

This does not that I'm antecipating any change in UHCI_NUMFRAMES. Is just that, as a general rule, I really prefer to let the compiler do the low-level optimizations to improve code maintenance.

--
Paulo Marques - www.grupopie.com

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke (1729 - 1797)


------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to