)\r
{\r
UINTN ReturnValue;\r
- UINTN Value;\r
\r
ASSERT_INVALID_PCI_ADDRESS (StartAddress);\r
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
//\r
// Read a word if StartAddress is word aligned\r
//\r
- Value = (UINTN) PciExpressRead16 (StartAddress);\r
- WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) Value);\r
+ WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress));\r
\r
StartAddress += sizeof (UINT16);\r
Size -= sizeof (UINT16);\r
//\r
// Read as many double words as possible\r
//\r
- Value = (UINTN) PciExpressRead32 (StartAddress);\r
- WriteUnaligned32 ((UINT32 *) Buffer, (UINT32) Value);\r
+ WriteUnaligned32 ((UINT32 *) Buffer, (UINT32) PciExpressRead32 (StartAddress));\r
\r
StartAddress += sizeof (UINT32);\r
Size -= sizeof (UINT32);\r
//\r
// Read the last remaining word if exist\r
//\r
- Value = (UINTN) PciExpressRead16 (StartAddress);\r
- WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) Value);\r
+ WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress));\r
StartAddress += sizeof (UINT16);\r
Size -= sizeof (UINT16);\r
Buffer = (UINT16*)Buffer + 1;\r