Re: [PATCH 31/68] uas: Pack iu struct definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 11/16/2013 07:11 PM, Alan Stern wrote:
On Sat, 16 Nov 2013, Hans de Goede wrote:

No, Linux relies on the compiler to pack things like this together and
not put padding in, with the __packed__ attribute (don't we have a
__packed macro instead of the __attribute__() thing?)

Yes we've a __packed macro, but the norm in the usb subsys seems to be to use
__attribute__ ((__packed__)), see include/[uapi/]linux/usb/*.h

That's different.  Things under include/uapi are meant for use by
userspace programs, so they can't rely on kernel-internal things like
the __packed macro.

Right, but almost all headers under include/linux/usb/*.h also use the
long form.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux