hv: fix misrac violations in vcpi code

Fixed the following violations:
- Widening cast on complex integer expression
- Casting operation to a pointer
- Static procedure is not explicitly called in code analysed

Tracked-On: #1568
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Zide Chen
2018-10-29 16:38:41 -07:00
committed by Xie, Nanlin
parent 5555a2f85d
commit dbe156e9f6
3 changed files with 22 additions and 22 deletions

View File

@@ -84,6 +84,12 @@ struct msix {
uint32_t table_count;
};
union cfgdata {
uint8_t data_8[PCI_REGMAX + 1U];
uint16_t data_16[(PCI_REGMAX + 1U) >> 2U];
uint32_t data_32[(PCI_REGMAX + 1U) >> 4U];
};
struct pci_vdev {
#ifndef CONFIG_PARTITION_MODE
#define MAX_VPCI_DEV_OPS 4U
@@ -99,7 +105,7 @@ struct pci_vdev {
struct pci_pdev pdev;
uint8_t cfgdata[PCI_REGMAX + 1U];
union cfgdata cfgdata;
/* The bar info of the virtual PCI device. */
struct pci_bar bar[PCI_BAR_COUNT];