Thread (64 messages) 64 messages, 7 authors, 2011-06-29

[PATCH] USB: ehci: use packed,aligned(4) instead of removing the packed attribute

From: stern@rowland.harvard.edu (Alan Stern)
Date: 2011-06-20 18:57:31
Also in: lkml

On Mon, 20 Jun 2011, Alexander Holler wrote:
Am 20.06.2011 20:39, schrieb Alan Stern:
quoted
On Mon, 20 Jun 2011, Alexander Holler wrote:
quoted
I see it that way: packed is needed to be sure that at least for struct
ehci_regs there are no padding bytes inbetween the members.
But is it _really_ needed?
quoted
It might
work without, but that depends on the compiler (-version, architecture,
whatever).
Have there _ever_ been _any_ combinations of compiler, version,
architecture, whatever, that had unwanted padding bytes in this
structure?
I don't know. But if there would be no doubts, this discussion would not 
happen and I assume there never would have been an attribute packed there.
Don't be so sure.  That is very old code; the attribute could easily 
have been present for no good reason.

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help