qemu_domain_address: Drop needless virDomainIOMMUModel typecast

There are two places where the @model member of
_virDomainIOMMUDef struct is typecasted to virDomainIOMMUModel
which is completely unnecessary because the struct already
defines the member of that type.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2022-07-04 11:09:46 +02:00
parent 49de22e2dc
commit 4a9c86ee2f

View File

@ -1003,7 +1003,7 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDef *dev,
break; break;
case VIR_DOMAIN_DEVICE_IOMMU: case VIR_DOMAIN_DEVICE_IOMMU:
switch ((virDomainIOMMUModel) dev->data.iommu->model) { switch (dev->data.iommu->model) {
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
return virtioFlags | VIR_PCI_CONNECT_INTEGRATED; return virtioFlags | VIR_PCI_CONNECT_INTEGRATED;
@ -2384,7 +2384,7 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def,
if (def->iommu) { if (def->iommu) {
virDomainIOMMUDef *iommu = def->iommu; virDomainIOMMUDef *iommu = def->iommu;
switch ((virDomainIOMMUModel) iommu->model) { switch (iommu->model) {
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
if (virDeviceInfoPCIAddressIsWanted(&iommu->info) && if (virDeviceInfoPCIAddressIsWanted(&iommu->info) &&
qemuDomainPCIAddressReserveNextAddr(addrs, &iommu->info) < 0) { qemuDomainPCIAddressReserveNextAddr(addrs, &iommu->info) < 0) {