[alsa-devel] [PATCH 4/8] firmware: Sigma: Mark firmware strutcs packed

Mike Frysinger vapier at gentoo.org
Thu Nov 24 18:19:34 CET 2011


On Thursday 24 November 2011 07:48:23 Lars-Peter Clausen wrote:
> Mark structs which are embedded into the firmware as packed to avoid
> alignment issues.

while in general this makes sense, i designed the struct layout specifically to 
work on any sane system.  that means 8bits align on 8bits, 16bits align on 
16bits, and 32bits align on 32bits.

do you see any place where this is not the case ?  otherwise, using __packed 
by itself doesn't make much sense unless you also change all the loads from 
the struct to the get_unaligned variety which would add useless overhead to 
many embedded parts.

all in all, i'd omit the __packed markings since they're unnecessary.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20111124/0dfe89cc/attachment.sig 


More information about the Alsa-devel mailing list