Am Donnerstag, 4. Januar 2007 19:38 schrieb Pete Zaitcev: > On Thu, 4 Jan 2007 17:59:41 +0100, Oliver Neukum <[EMAIL PROTECTED]> wrote: > > > + case USB_CDC_DMM_TYPE: > > + maxcom = le16_to_cpu(*((u16 *)(buffer + 5))); > > What an atrocious way to program. If you insist on saving a few instructions > by not using buffer[6]<<8|buffer[5], at least put get_unaligned in there.
Thanks for noticing the unaligned pointer. I consider this the clean way of doing this. I want to do an endianness correct access and thus I specify that by using the function that is very clearly named instead of some unclear biitshifts. A few instructions are not an issue in probe(). Regards Oliver ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel