Re: [i2c] [PATCH 1/1] i2c: align i2c_device_id
From: Trent Piepho
Date: Tue May 20 2008 - 00:25:53 EST
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?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/