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

2013-11-18 Thread Paul Zimmerman
> From: linux-usb-ow...@vger.kernel.org > [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of David Laight > Sent: Monday, November 18, 2013 1:36 AM > > > It doesn't look like the networking subsystem (which seems to be the > > code you're most familiar with) uses packed, but plenty of other >

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

2013-11-18 Thread David Laight
> It doesn't look like the networking subsystem (which seems to be the > code you're most familiar with) uses packed, but plenty of other > subsystems do. I'm necessarily trying to change the world here :-) But ... I suspect a few places have got caught out where 32bit values get 16bit aligned an

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

2013-11-16 Thread Hans de Goede
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

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

2013-11-16 Thread Alan Stern
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

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

2013-11-16 Thread Hans de Goede
Hi, On 11/15/2013 10:09 PM, Greg KH wrote: On Fri, Nov 15, 2013 at 03:56:31PM -, David Laight wrote: From: Hans de Goede [mailto:hdego...@redhat.com] On 11/15/2013 04:29 PM, David Laight wrote: From: Of Hans de Goede The iu struct definitions are usb packet definitions, so no alignment sh

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

2013-11-15 Thread Sarah Sharp
On Fri, Nov 15, 2013 at 03:56:31PM -, David Laight wrote: > > From: Hans de Goede [mailto:hdego...@redhat.com] > > On 11/15/2013 04:29 PM, David Laight wrote: > > >> From: Of Hans de Goede > > >> > > >> The iu struct definitions are usb packet definitions, so no alignment > > >> should > > >>

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

2013-11-15 Thread Greg KH
On Fri, Nov 15, 2013 at 03:56:31PM -, David Laight wrote: > > From: Hans de Goede [mailto:hdego...@redhat.com] > > On 11/15/2013 04:29 PM, David Laight wrote: > > >> From: Of Hans de Goede > > >> > > >> The iu struct definitions are usb packet definitions, so no alignment > > >> should > > >>

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

2013-11-15 Thread David Laight
> From: Hans de Goede [mailto:hdego...@redhat.com] > On 11/15/2013 04:29 PM, David Laight wrote: > >> From: Of Hans de Goede > >> > >> The iu struct definitions are usb packet definitions, so no alignment > >> should > >> happen. Notice that assuming 32 bit alignment this does not make any > >> di

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

2013-11-15 Thread Hans de Goede
Hi, On 11/15/2013 04:29 PM, David Laight wrote: From: Of Hans de Goede The iu struct definitions are usb packet definitions, so no alignment should happen. Notice that assuming 32 bit alignment this does not make any difference at all. Signed-off-by: Hans de Goede --- include/linux/usb/uas.

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

2013-11-15 Thread David Laight
> From: Of Hans de Goede > > The iu struct definitions are usb packet definitions, so no alignment should > happen. Notice that assuming 32 bit alignment this does not make any > difference at all. > > Signed-off-by: Hans de Goede > --- > include/linux/usb/uas.h | 10 +- > 1 file change