mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-11 05:39:45 +00:00
hv: MISRA-C fix "identifier reuse" in vpci code
13X: Identifier reuse: tag vs component. A tag name shall be a unique identifier Change the following names: struct msi --> struct pci_msi struct msix --> struct pci_msix struct vpci --> struct acrn_vpci union cfgdata -> union pci_cfgdata Tracked-On: #861 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -151,7 +151,7 @@ struct acrn_vm {
|
||||
|
||||
uint32_t vcpuid_entry_nr, vcpuid_level, vcpuid_xlevel;
|
||||
struct vcpuid_entry vcpuid_entries[MAX_VM_VCPUID_ENTRIES];
|
||||
struct vpci vpci;
|
||||
struct acrn_vpci vpci;
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
struct vm_description *vm_desc;
|
||||
uint8_t vrtc_offset;
|
||||
|
@@ -66,13 +66,13 @@ struct pci_pdev {
|
||||
};
|
||||
|
||||
/* MSI capability structure */
|
||||
struct msi {
|
||||
struct pci_msi {
|
||||
uint32_t capoff;
|
||||
uint32_t caplen;
|
||||
};
|
||||
|
||||
/* MSI-X capability structure */
|
||||
struct msix {
|
||||
struct pci_msix {
|
||||
struct msix_table_entry tables[CONFIG_MAX_MSIX_TABLE_NUM];
|
||||
uint64_t mmio_gpa;
|
||||
uint64_t mmio_hva;
|
||||
@@ -86,7 +86,7 @@ struct msix {
|
||||
uint32_t table_count;
|
||||
};
|
||||
|
||||
union cfgdata {
|
||||
union pci_cfgdata {
|
||||
uint8_t data_8[PCI_REGMAX + 1U];
|
||||
uint16_t data_16[(PCI_REGMAX + 1U) >> 2U];
|
||||
uint32_t data_32[(PCI_REGMAX + 1U) >> 4U];
|
||||
@@ -101,20 +101,20 @@ struct pci_vdev {
|
||||
struct pci_vdev_ops *ops;
|
||||
#endif
|
||||
|
||||
struct vpci *vpci;
|
||||
struct acrn_vpci *vpci;
|
||||
/* The bus/device/function triple of the virtual PCI device. */
|
||||
union pci_bdf vbdf;
|
||||
|
||||
struct pci_pdev pdev;
|
||||
|
||||
union cfgdata cfgdata;
|
||||
union pci_cfgdata cfgdata;
|
||||
|
||||
/* The bar info of the virtual PCI device. */
|
||||
struct pci_bar bar[PCI_BAR_COUNT];
|
||||
|
||||
#ifndef CONFIG_PARTITION_MODE
|
||||
struct msi msi;
|
||||
struct msix msix;
|
||||
struct pci_msi msi;
|
||||
struct pci_msix msix;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -127,14 +127,14 @@ struct pci_addr_info {
|
||||
struct vpci_ops {
|
||||
int32_t (*init)(struct acrn_vm *vm);
|
||||
void (*deinit)(struct acrn_vm *vm);
|
||||
void (*cfgread)(struct vpci *vpci, union pci_bdf vbdf, uint32_t offset,
|
||||
void (*cfgread)(struct acrn_vpci *vpci, union pci_bdf vbdf, uint32_t offset,
|
||||
uint32_t bytes, uint32_t *val);
|
||||
void (*cfgwrite)(struct vpci *vpci, union pci_bdf vbdf, uint32_t offset,
|
||||
void (*cfgwrite)(struct acrn_vpci *vpci, union pci_bdf vbdf, uint32_t offset,
|
||||
uint32_t bytes, uint32_t val);
|
||||
};
|
||||
|
||||
|
||||
struct vpci {
|
||||
struct acrn_vpci {
|
||||
struct acrn_vm *vm;
|
||||
struct pci_addr_info addr_info;
|
||||
struct vpci_ops *ops;
|
||||
|
Reference in New Issue
Block a user