On Mon, 19 May 2008, Jiri Slaby wrote: > On 05/19/2008 09:00 PM, Jean Delvare wrote: > > Thanks for this patch, it's in my i2c tree now and will be sent to > > Linus by the end of the week. I wasn't aware of this possible alignment > > issue, sorry. > > To be honest, neither I was until I hit it while testing hid bus (where I did > the same mistake). Thanks.
Is there any more information about this? Items in a structure should be aligned to the alignment required by their type. Usually sizeof(x) == alignof(x), but not always. I guess in this case the structures are used as a cross-platform binary on disk representation, and so the alignment of the build host must match the alignment of the target? Maybe it would be better to include the alignment attribute in the definition of kernel_ulong_t? _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c
