mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
hv: fix MISRA-C violations in vpci code: 93S, 331S and 612S
- 331S: Literal value requires a U suffix. - 612S: inline function should be declared static. - 93S: Value is not of appropriate type. MISRA-C imposes strict type checking: no comparison between signed and unsigned, etc. Tracked-On: #861 Signed-off-by: Zide Chen <zide.chen@intel.com> Reviewed-by: Huihuang Shi <huihuang.shi@intel.com>
This commit is contained in:
@@ -242,14 +242,14 @@ static int vmsix_table_mmio_access_handler(struct io_request *io_req, void *hand
|
||||
{
|
||||
struct mmio_request *mmio = &io_req->reqs.mmio;
|
||||
struct pci_vdev *vdev;
|
||||
uint32_t offset;
|
||||
uint64_t offset;
|
||||
uint64_t hva;
|
||||
|
||||
vdev = (struct pci_vdev *)handler_private_data;
|
||||
offset = (uint32_t)(mmio->address - vdev->msix.mmio_gpa);
|
||||
offset = mmio->address - vdev->msix.mmio_gpa;
|
||||
|
||||
if (msixtable_access(vdev, offset)) {
|
||||
vmsix_table_rw(vdev, mmio, offset);
|
||||
if (msixtable_access(vdev, (uint32_t)offset)) {
|
||||
vmsix_table_rw(vdev, mmio, (uint32_t)offset);
|
||||
} else {
|
||||
hva = vdev->msix.mmio_hva + offset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user