]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super-intel: don't mark structs 'packed' unnecessarily
authorNeilBrown <neilb@suse.de>
Thu, 31 Oct 2019 04:15:38 +0000 (15:15 +1100)
committerJes Sorensen <jsorensen@fb.com>
Tue, 12 Nov 2019 20:38:40 +0000 (15:38 -0500)
commit761e3bd9f5e3aafa95ad3ae50a637dc67c8774f0
treef3c2b5171be2b43301a0d85adb317543a70a2ae5
parent85b83a7920bca5b93d2458f093f2c640a130614c
super-intel: don't mark structs 'packed' unnecessarily

super-intel marks a number of structures 'packed', but this
doesn't change the layout - they are already well organized.

This is a problem a gcc warns when code takes the address
of a field in a packet struct - as super-intel sometimes does.

So remove the marking where isn't needed.
Do ensure this does introduce a regression, add a compile-time
assertion that the size of the structure is exactly the value
it had before the 'packed' notation was removed.

Note that a couple of structure do need to be packed.
As the address of fields is never taken, that is safe.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
super-intel.c