\r
**/\r
\r
-#ifndef _PEI_SMBUS_PPI_H\r
-#define _PEI_SMBUS_PPI_H\r
+#ifndef _PEI_SMBUS_PPI_H_\r
+#define _PEI_SMBUS_PPI_H_\r
\r
#include <PiPei.h>\r
#include <Ppi/Smbus2.h>\r
typedef struct _EFI_LEGACY_BIOS_PROTOCOL EFI_LEGACY_BIOS_PROTOCOL;\r
\r
//\r
-/// @bug: These macros appear in no specifications and are kept for backward\r
+/// @bug These macros appear in no specifications and are kept for backward\r
// compatibility only.\r
// Convert from 32-bit address (_Adr) to Segment:Offset 16-bit form\r
//\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length--) {\r
+ while (Length-- > 0) {\r
*(Buffer++) = MmioRead8 (StartAddress++);\r
}\r
\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
*(Buffer++) = MmioRead16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
Length -= sizeof (UINT16);\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
*(Buffer++) = MmioRead32 (StartAddress);\r
StartAddress += sizeof (UINT32);\r
Length -= sizeof (UINT32);\r
\r
ReturnBuffer = Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
*(Buffer++) = MmioRead64 (StartAddress);\r
StartAddress += sizeof (UINT64);\r
Length -= sizeof (UINT64);\r
\r
ReturnBuffer = (UINT8 *) Buffer;\r
\r
- while (Length--) {\r
+ while (Length-- > 0) {\r
MmioWrite8 (StartAddress++, *(Buffer++));\r
}\r
\r
\r
ReturnBuffer = (UINT16 *) Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
MmioWrite16 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT16);\r
\r
ReturnBuffer = (UINT32 *) Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
MmioWrite32 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT32);\r
\r
ReturnBuffer = (UINT64 *) Buffer;\r
\r
- while (Length) {\r
+ while (Length > 0) {\r
MmioWrite64 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT64);\r