]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / SmmIoLibSmmCpuIo2 / IoLib.c
index 0279bde27eb385aa99a8c65037de4e8f27e7f176..49802aa8d022c728a827c2ac81d8de7da359a2e9 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
   I/O Library.\r
-  The implementation of I/O operation for this library instance \r
+  The implementation of I/O operation for this library instance\r
   are based on EFI_CPU_IO_PROTOCOL.\r
-  \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
@@ -120,7 +120,7 @@ MmioReadWorker (
                         The caller is responsible for aligning the Address if required.\r
   @param  Width         The width of the I/O operation.\r
   @param  Data          The value to write to the I/O port.\r
-  \r
+\r
   @return Data read from registers in the EFI system memory space.\r
 \r
 **/\r
@@ -196,7 +196,7 @@ IoWrite8 (
   serialized.\r
 \r
   If Port is not aligned on a 16-bit boundary, then ASSERT().\r
\r
+\r
   If 16-bit I/O port operations are not supported, then ASSERT().\r
 \r
   @param  Port  The I/O port to read.\r
@@ -254,7 +254,7 @@ IoWrite16 (
   Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.\r
   This function must guarantee that all I/O read and write operations are\r
   serialized.\r
\r
+\r
   If Port is not aligned on a 32-bit boundary, then ASSERT().\r
 \r
   If 32-bit I/O port operations are not supported, then ASSERT().\r
@@ -345,7 +345,7 @@ IoRead64 (
   operations are serialized.\r
 \r
   If Port is not aligned on a 64-bit boundary, then ASSERT().\r
\r
+\r
   If 64-bit I/O port operations are not supported, then ASSERT().\r
 \r
   @param  Port  The I/O port to write.\r
@@ -396,7 +396,7 @@ IoReadFifo8 (
   UINT8 *Buffer8;\r
 \r
   Buffer8 = (UINT8 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     *Buffer8++ = IoRead8 (Port);\r
   }\r
 }\r
@@ -429,7 +429,7 @@ IoWriteFifo8 (
   UINT8 *Buffer8;\r
 \r
   Buffer8 = (UINT8 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     IoWrite8 (Port, *Buffer8++);\r
   }\r
 }\r
@@ -466,7 +466,7 @@ IoReadFifo16 (
   //\r
   ASSERT ((Port & 1) == 0);\r
   Buffer16 = (UINT16 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     *Buffer16++ = IoRead16 (Port);\r
   }\r
 }\r
@@ -503,7 +503,7 @@ IoWriteFifo16 (
   //\r
   ASSERT ((Port & 1) == 0);\r
   Buffer16 = (UINT16 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     IoWrite16 (Port, *Buffer16++);\r
   }\r
 }\r
@@ -540,7 +540,7 @@ IoReadFifo32 (
   //\r
   ASSERT ((Port & 3) == 0);\r
   Buffer32 = (UINT32 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     *Buffer32++ = IoRead32 (Port);\r
   }\r
 }\r
@@ -577,7 +577,7 @@ IoWriteFifo32 (
   //\r
   ASSERT ((Port & 3) == 0);\r
   Buffer32 = (UINT32 *)Buffer;\r
-  while (Count--) {\r
+  while (Count-- > 0) {\r
     IoWrite32 (Port, *Buffer32++);\r
   }\r
 }\r
@@ -636,7 +636,7 @@ MmioWrite8 (
   operations are serialized.\r
 \r
   If Address is not aligned on a 16-bit boundary, then ASSERT().\r
\r
+\r
   If 16-bit MMIO register operations are not supported, then ASSERT().\r
 \r
   @param  Address The MMIO register to read.\r
@@ -665,7 +665,7 @@ MmioRead16 (
   and write operations are serialized.\r
 \r
   If Address is not aligned on a 16-bit boundary, then ASSERT().\r
\r
+\r
   If 16-bit MMIO register operations are not supported, then ASSERT().\r
 \r
   @param  Address The MMIO register to write.\r
@@ -694,7 +694,7 @@ MmioWrite16 (
   operations are serialized.\r
 \r
   If Address is not aligned on a 32-bit boundary, then ASSERT().\r
-  \r
+\r
   If 32-bit MMIO register operations are not supported, then ASSERT().\r
 \r
   @param  Address The MMIO register to read.\r
@@ -723,7 +723,7 @@ MmioRead32 (
   and write operations are serialized.\r
 \r
   If Address is not aligned on a 32-bit boundary, then ASSERT().\r
\r
+\r
   If 32-bit MMIO register operations are not supported, then ASSERT().\r
 \r
   @param  Address The MMIO register to write.\r
@@ -752,7 +752,7 @@ MmioWrite32 (
   operations are serialized.\r
 \r
   If Address is not aligned on a 64-bit boundary, then ASSERT().\r
\r
+\r
   If 64-bit MMIO register operations are not supported, then ASSERT().\r
 \r
   @param  Address The MMIO register to read.\r
@@ -781,7 +781,7 @@ MmioRead64 (
   and write operations are serialized.\r
 \r
   If Address is not aligned on a 64-bit boundary, then ASSERT().\r
\r
+\r
   If 64-bit MMIO register operations are not supported, then ASSERT().\r
 \r
   @param  Address The MMIO register to write.\r