]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / XhciDxe / UsbHcMem.c
index 7c5261cca2114afb322adaece8e6917b2b6d978e..b5840a959f866d3cc462eaad4cbbd9790f35cbe1 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Routine procedures for memory allocate/free.\r
 \r
-Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -598,23 +598,23 @@ UsbHcFreeMem (
   return ;\r
 }\r
 \r
-/**  \r
+/**\r
   Allocates pages at a specified alignment that are suitable for an EfiPciIoOperationBusMasterCommonBuffer mapping.\r
-  \r
+\r
   If Alignment is not a power of two and Alignment is not zero, then ASSERT().\r
 \r
   @param  PciIo                 The PciIo that can be used to access the host controller.\r
   @param  Pages                 The number of pages to allocate.\r
   @param  Alignment             The requested alignment of the allocation.  Must be a power of two.\r
   @param  HostAddress           The system memory address to map to the PCI controller.\r
-  @param  DeviceAddress         The resulting map address for the bus master PCI controller to \r
+  @param  DeviceAddress         The resulting map address for the bus master PCI controller to\r
                                 use to access the hosts HostAddress.\r
   @param  Mapping               A resulting value to pass to Unmap().\r
 \r
   @retval EFI_SUCCESS           Success to allocate aligned pages.\r
   @retval EFI_INVALID_PARAMETER Pages or Alignment is not valid.\r
   @retval EFI_OUT_OF_RESOURCES  Do not have enough resources to allocate memory.\r
-  \r
+\r
 \r
 **/\r
 EFI_STATUS\r
@@ -639,11 +639,11 @@ UsbHcAllocateAlignedPages (
   // Alignment must be a power of two or zero.\r
   //\r
   ASSERT ((Alignment & (Alignment - 1)) == 0);\r
-  \r
+\r
   if ((Alignment & (Alignment - 1)) != 0) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
\r
+\r
   if (Pages == 0) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -657,7 +657,7 @@ UsbHcAllocateAlignedPages (
     // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.\r
     //\r
     ASSERT (RealPages > Pages);\r
\r
+\r
     Status = PciIo->AllocateBuffer (\r
                       PciIo,\r
                       AllocateAnyPages,\r
@@ -665,7 +665,7 @@ UsbHcAllocateAlignedPages (
                       Pages,\r
                       &Memory,\r
                       0\r
-                      );    \r
+                      );\r
     if (EFI_ERROR (Status)) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
@@ -719,7 +719,7 @@ UsbHcAllocateAlignedPages (
     Status = PciIo->FreeBuffer (PciIo, Pages, (VOID *) AlignedMemory);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
-  \r
+\r
   *HostAddress = (VOID *) AlignedMemory;\r
 \r
   return EFI_SUCCESS;\r
@@ -727,7 +727,7 @@ UsbHcAllocateAlignedPages (
 \r
 /**\r
   Frees memory that was allocated with UsbHcAllocateAlignedPages().\r
-  \r
+\r
   @param  PciIo                 The PciIo that can be used to access the host controller.\r
   @param  HostAddress           The system memory address to map to the PCI controller.\r
   @param  Pages                 The number of 4 KB pages to free.\r
@@ -743,9 +743,9 @@ UsbHcFreeAlignedPages (
   )\r
 {\r
   EFI_STATUS      Status;\r
-  \r
+\r
   ASSERT (Pages != 0);\r
-  \r
+\r
   Status = PciIo->Unmap (PciIo, Mapping);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
@@ -753,6 +753,6 @@ UsbHcFreeAlignedPages (
                     PciIo,\r
                     Pages,\r
                     HostAddress\r
-                    );     \r
+                    );\r
   ASSERT_EFI_ERROR (Status);\r
 }\r