mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 22:18:17 +00:00
hv: fix MISRA-C violations in vpci code: Function pointer is of wrong type
576S: Function pointer is of wrong type. C90 requires the elements of an designated initializer to appear in a fixed order, the same as the order of declaration. C99 relaxes this rule but seems MISRA-C sticks to C90 in this regard. Tracked-On: #861 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com> Reviewed-by: Huihuang Shi <huihuang.shi@intel.com>
This commit is contained in:
parent
d3f0edfe4f
commit
bad813ea31
@ -121,7 +121,7 @@ static int vdev_hostbridge_cfgwrite(struct pci_vdev *vdev, uint32_t offset,
|
|||||||
struct pci_vdev_ops pci_ops_vdev_hostbridge = {
|
struct pci_vdev_ops pci_ops_vdev_hostbridge = {
|
||||||
.init = vdev_hostbridge_init,
|
.init = vdev_hostbridge_init,
|
||||||
.deinit = vdev_hostbridge_deinit,
|
.deinit = vdev_hostbridge_deinit,
|
||||||
.cfgread = vdev_hostbridge_cfgread,
|
|
||||||
.cfgwrite = vdev_hostbridge_cfgwrite,
|
.cfgwrite = vdev_hostbridge_cfgwrite,
|
||||||
|
.cfgread = vdev_hostbridge_cfgread,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -223,7 +223,6 @@ static int vmsi_deinit(struct pci_vdev *vdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct pci_vdev_ops pci_ops_vdev_msi = {
|
struct pci_vdev_ops pci_ops_vdev_msi = {
|
||||||
.init = NULL,
|
|
||||||
.deinit = vmsi_deinit,
|
.deinit = vmsi_deinit,
|
||||||
.cfgwrite = vmsi_cfgwrite,
|
.cfgwrite = vmsi_cfgwrite,
|
||||||
.cfgread = vmsi_cfgread,
|
.cfgread = vmsi_cfgread,
|
||||||
|
@ -198,7 +198,7 @@ static int vdev_pt_cfgwrite(struct pci_vdev *vdev, uint32_t offset,
|
|||||||
struct pci_vdev_ops pci_ops_vdev_pt = {
|
struct pci_vdev_ops pci_ops_vdev_pt = {
|
||||||
.init = vdev_pt_init,
|
.init = vdev_pt_init,
|
||||||
.deinit = vdev_pt_deinit,
|
.deinit = vdev_pt_deinit,
|
||||||
.cfgread = vdev_pt_cfgread,
|
|
||||||
.cfgwrite = vdev_pt_cfgwrite,
|
.cfgwrite = vdev_pt_cfgwrite,
|
||||||
|
.cfgread = vdev_pt_cfgread,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user