Re: [PATCH 2/2] usb/uas: add usb_pipe_usage_descriptor

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

 



On 01/11/2012 02:44 PM, Matthew Wilcox wrote:
On Wed, Jan 11, 2012 at 12:45:57PM +0100, Sebastian Andrzej Siewior wrote:
+struct usb_pipe_usage_descriptor {
+	__u8  bLength;
+	__u8  bDescriptorType;
+
+	__u8  bPipeID;
+	__u8  Reserved;
+} __attribute__((__packed__));
+

The only thing you'll accomplish by putting a 'packed' attribute on
this struct is annoying gcc and possibly making it produce worse code.
Everything in it is a byte!

No. I accomplish that gcc may not pad between those elements. Yes, it
should not but it may. Since this structure is pre-defined to be exact
this the packed attribute should be put there. This is why gcc has the
the packed attribute.

Sebastian
--
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