On Fri, 2008-03-07 at 19:17 -0800, Harvey Harrison wrote: > Also remove Hi16/Lo16 and open code them in the one place they > are used. > int i, j; > + __le16 *ptr = (__le16 *)ta; /* address is held in LE byteorder */ > + > + p1k[0] = tsc_IV32 & 0xffff; > + p1k[1] = tsc_IV32 >> 16; > + p1k[2] = __le16_to_cpup(ptr++); > + p1k[3] = __le16_to_cpup(ptr++); > + p1k[4] = __le16_to_cpup(ptr); > > - p1k[0] = Lo16(tsc_IV32); > - p1k[1] = Hi16(tsc_IV32); > - p1k[2] = Mk16(ta[1], ta[0]); > - p1k[3] = Mk16(ta[3], ta[2]); > - p1k[4] = Mk16(ta[5], ta[4]); NACK! Now the code assumes natural alignment of the u16s which is, as far as I can tell, completely bogus. Please review Documentation/unaligned-memory-access.txt. Also, again, please don't use the underscored versions of functions. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part