hv: coding style: use the defined data type __packed

1) Use __attribute__((packed)) instead of #pragma pack(1)
2) Use the defined data type __packed instead of __attribute__((packed))

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-12-28 23:27:54 +08:00
committed by wenlingz
parent 40f6a9fdff
commit 6f0edfc38d
7 changed files with 15 additions and 19 deletions

View File

@@ -172,8 +172,6 @@ void invept(const struct acrn_vcpu *vcpu);
uint64_t *lookup_address(uint64_t *pml4_page, uint64_t addr,
uint64_t *pg_size, const struct memory_ops *mem_ops);
#pragma pack(1)
/** Defines a single entry in an E820 memory map. */
struct e820_entry {
/** The base address of the memory range. */
@@ -182,9 +180,7 @@ struct e820_entry {
uint64_t length;
/** The type of memory region. */
uint32_t type;
};
#pragma pack()
} __packed;
/* E820 memory types */
#define E820_TYPE_RAM 1U /* EFI 1, 2, 3, 4, 5, 6, 7 */