On Wed, 7 Feb 2007, Sergei Organov wrote: > In fact if there were macro/function similar to get_unaligned(), but > converting from little-/big-endian to native, say, get_unaligned_le(), > I'd use it:
... > Unfortunately there is no such macro, or did I miss it? I have often thought exactly the same thing. It seems so natural to combine unaligned reads and writes with byte-reordering. I even brought up the issue on LKML: Why shouldn't there be architecture-dependent versions of get_unaligned_le16(), get_unaligned_le32(), get_unaligned_le64(), get_unaligned_be16(), get_unaligned_be32(), get_unaligned_be64(), and the corresponding put_unaligned...() things? But for some unclear reason people weren't in favor of it. And as a result, the kernel is filled with roll-your-own versions of these things. Alan Stern ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel