summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2010-09-15 07:48:11 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2010-09-15 07:48:11 +0000
commitc9325700d0ef25eaf45077928af3f93b15ac5fe0 (patch)
treec46ae68c26db3a5a6a9e58b37b53265aa2f770d3 /MdeModulePkg/Bus/Pci
parentf6b4e53dfe43c27d448cedb57059e5b7ca236dd8 (diff)
downloadedk2-platforms-c9325700d0ef25eaf45077928af3f93b15ac5fe0.tar.xz
Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r--MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c2
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c4
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
index 6f1a6a10e1..3d581b69fd 100644
--- a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
+++ b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c
@@ -346,7 +346,7 @@ PCheckDevice (
Dsc = (EFI_PCI_RESOUCE_DESCRIPTOR *) (ListPtr + 1);
AcpiPtr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
- AcpiPtr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR);
+ AcpiPtr->Len = (UINT16) sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR);
AcpiPtr->ResType = (UINT8) Dsc->ResType;
AcpiPtr->GenFlag = (UINT8) Dsc->GenFlag;
AcpiPtr->SpecificFlag = (UINT8) Dsc->SpecificFlag;
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
index fca0084016..09b58ac0de 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
@@ -983,7 +983,7 @@ PciHostBridgeAdjustAllocation (
// Have no way to get ReqRes, AllocRes & Bar here
//
ZeroMem (&AllocFailExtendedData, sizeof (AllocFailExtendedData));
- AllocFailExtendedData.DevicePathSize = sizeof (EFI_DEVICE_PATH_PROTOCOL);
+ AllocFailExtendedData.DevicePathSize = (UINT16) sizeof (EFI_DEVICE_PATH_PROTOCOL);
AllocFailExtendedData.DevicePath = (UINT8 *) PciResNode->PciDev->DevicePath;
AllocFailExtendedData.Bar = PciResNode->Bar;
@@ -1108,7 +1108,7 @@ ConstructAcpiResourceRequestor (
//
if ((Aperture & 0x01) != 0) {
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
- Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
+ Ptr->Len = (UINT16) (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3);
//
// Io
//
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
index fe67dc20cd..0969407831 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
@@ -1637,7 +1637,7 @@ PciIoGetBarAttributes (
if (NumConfig == 1) {
Ptr->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
- Ptr->Len = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;
+ Ptr->Len = (UINT16) (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3);
Ptr->AddrRangeMin = PciIoDevice->PciBar[BarIndex].BaseAddress;
Ptr->AddrLen = PciIoDevice->PciBar[BarIndex].Length;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
index 7a53f36a60..1a0aa6e636 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.c
@@ -355,7 +355,7 @@ UhciCreateSetupTd (
Td->TdHw.DataBuffer = (UINT32) (UINTN) RequestPhy;
Td->Data = Request;
- Td->DataLen = sizeof (EFI_USB_DEVICE_REQUEST);
+ Td->DataLen = (UINT16) sizeof (EFI_USB_DEVICE_REQUEST);
return Td;
}