summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
index 4b95028e4a..49adf63a7c 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
@@ -1475,8 +1475,8 @@ BuildAdmaDescTable (
{
EFI_PHYSICAL_ADDRESS Data;
UINT64 DataLen;
- UINT64 Entries;
- UINT64 Index;
+ UINTN Entries;
+ UINTN Index;
UINT64 Remaining;
UINT64 Address;
UINTN TableSize;
@@ -1539,8 +1539,8 @@ BuildAdmaDescTable (
AdmaMaxDataPerLine = ADMA_MAX_DATA_PER_LINE_26B;
}
- Entries = DivU64x32 ((DataLen + AdmaMaxDataPerLine - 1), AdmaMaxDataPerLine);
- TableSize = (UINTN)MultU64x32 (Entries, DescSize);
+ Entries = (UINTN)DivU64x32 ((DataLen + AdmaMaxDataPerLine - 1), AdmaMaxDataPerLine);
+ TableSize = Entries * DescSize;
Trb->AdmaPages = (UINT32)EFI_SIZE_TO_PAGES (TableSize);
Status = PciIo->AllocateBuffer (
PciIo,