This PPI can be consumed by PEIM which produce gEfiPeiDeviceRecoveryModulePpiGuid\r
for Atapi CD ROM device.\r
\r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
//\r
// Pata & Sata, Primary & Secondary channel, Master & Slave device\r
//\r
- DevicePosition = (UINTN) (Index1 * 2 + Index2);\r
+ DevicePosition = Index1 * 2 + Index2;\r
\r
if (DiscoverAtapiDevice (AtapiBlkIoDev, DevicePosition, &MediaInfo, &MediaInfo2)) {\r
//\r
\r
if (MediaInfo->DeviceType == IdeCDROM) {\r
\r
- MediaInfo->LastBlock = (Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;\r
+ MediaInfo->LastBlock = ((UINT32) Data.LastLba3 << 24) | (Data.LastLba2 << 16) | (Data.LastLba1 << 8) | Data.LastLba0;\r
MediaInfo->MediaPresent = TRUE;\r
//\r
// Because the user data portion in the sector of the Data CD supported\r
MediaInfo2->MediaPresent = FALSE;\r
MediaInfo2->LastBlock = 0;\r
} else {\r
- MediaInfo->LastBlock = (FormatData.LastLba3 << 24) |\r
+ MediaInfo->LastBlock = ((UINT32) FormatData.LastLba3 << 24) |\r
(FormatData.LastLba2 << 16) |\r
(FormatData.LastLba1 << 8) |\r
FormatData.LastLba0;\r