On 04/05/2011 03:15 PM, RafaÅ MiÅecki wrote:
I was reading about __packed long time ago and it was a little tricky for me. However I don't see anything in mod_devicetable.h using that __packed. Why should we?
Packed should only be used for those structs that are read/written by some entity other than the main CPU. For example, RX and TX descriptors must be packed. Otherwise, you should let the compiler align them any way that it thinks might be more efficient. If that requires holes to aligh a 16-bit quantity, let it. Of course, it would not make any difference for x86 on this one, but for some architectures (ARM, I think is one), the system must do byte accesses for all entries in a packed struct, just in case they are unaligned.
Larry -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html