]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/XhciPei/XhciSched.c
1) Add type cast for better coding style.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / XhciPei / XhciSched.c
index aedc2e8dc04b78e61c47df4a65fae3731e5be702..dde31e0f1a580f294a14835f1f96894677b70885 100644 (file)
@@ -1754,8 +1754,8 @@ XhcPeiSetConfigCmd (
                   ((TRANSFER_RING *) (UINTN) Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1])->RingSeg0,\r
                   sizeof (TRB_TEMPLATE) * TR_RING_TRB_NUMBER\r
                   );\r
-      PhyAddr &= ~(0x0F);\r
-      PhyAddr |= ((TRANSFER_RING *) (UINTN) Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1])->RingPCS;\r
+      PhyAddr &= ~((EFI_PHYSICAL_ADDRESS)0x0F);\r
+      PhyAddr |= (EFI_PHYSICAL_ADDRESS)((TRANSFER_RING *) (UINTN) Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1])->RingPCS;\r
       InputContext->EP[Dci-1].PtrLo = XHC_LOW_32BIT (PhyAddr);\r
       InputContext->EP[Dci-1].PtrHi = XHC_HIGH_32BIT (PhyAddr);\r
 \r
@@ -1948,8 +1948,8 @@ XhcPeiSetConfigCmd64 (
                   sizeof (TRB_TEMPLATE) * TR_RING_TRB_NUMBER\r
                   );\r
 \r
-      PhyAddr &= ~(0x0F);\r
-      PhyAddr |= ((TRANSFER_RING *) (UINTN) Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1])->RingPCS;\r
+      PhyAddr &= ~((EFI_PHYSICAL_ADDRESS)0x0F);\r
+      PhyAddr |= (EFI_PHYSICAL_ADDRESS)((TRANSFER_RING *) (UINTN) Xhc->UsbDevContext[SlotId].EndpointTransferRing[Dci-1])->RingPCS;\r
 \r
       InputContext->EP[Dci-1].PtrLo = XHC_LOW_32BIT (PhyAddr);\r
       InputContext->EP[Dci-1].PtrHi = XHC_HIGH_32BIT (PhyAddr);\r