escc: avoid structure holes spotted by pahole
commitd7b9553489f896bbcdb47403edb92f0bfb02eeaa
authorBlue Swirl <blauwirbel@gmail.com>
Sun, 7 Aug 2011 19:55:23 +0000 (7 19:55 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 21 Aug 2011 20:01:59 +0000 (21 20:01 +0000)
tree0004f3b6fff55aeab3df31697c02486ae619e5ee
parent242cca4fdfadafca39fa918e78fea6ef89d6decc
escc: avoid structure holes spotted by pahole

Edited report from pahole on amd64 host:
struct ChannelState {
...
ChnType                    type;                 /*    32     4 */

/* XXX 4 bytes hole, try to pack */
...
uint8_t                    rregs[16];            /*    66    16 */

/* XXX 2 bytes hole, try to pack */
...
/* size: 392, cachelines: 7 */
/* sum members: 382, holes: 2, sum holes: 6 */
/* padding: 4 */
/* last cacheline: 8 bytes */
}; /* definitions: 1 */

Fix by rearranging the structure to avoid padding.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/escc.c