]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c
Fixup for review
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciHotPlugSupport.c
index dbf3a749d378cc0fbf2b7d3ec8d140bff68a28c4..dcc6d72058c70a3bbafaa0561a3489725264b8d2 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/**@ file\r
   This module provide support function for hot plug device.\r
   \r
 Copyright (c) 2006, Intel Corporation                                                         \r
@@ -44,11 +44,11 @@ PciHPCInitialized (
 /**\r
   Compare two device path\r
   \r
-  @param DevicePath1    the first device path want to be compared\r
-  @param DevicePath2    the first device path want to be compared\r
+  @param DevicePath1    the first device path want to be compared.\r
+  @param DevicePath2    the first device path want to be compared.\r
   \r
-  @retval TRUE    equal\r
-  @retval FALSE   different\r
+  @retval TRUE    equal.\r
+  @retval FALSE   different.\r
 **/\r
 BOOLEAN\r
 EfiCompareDevicePath (\r
@@ -131,11 +131,11 @@ InitializeHotPlugSupport (
 /**\r
   Test whether device path is for root pci hot plug bus\r
   \r
-  @param HpbdevicePath  tested device path\r
+  @param HpbdevicePath  tested device path.\r
   @param HpIndex        Return the index of root hot plug in global array.\r
   \r
-  @retval TRUE  device path is for root pci hot plug\r
-  @retval FALSE device path is not for root pci hot plug\r
+  @retval TRUE  device path is for root pci hot plug.\r
+  @retval FALSE device path is not for root pci hot plug.\r
 **/\r
 BOOLEAN\r
 IsRootPciHotPlugBus (\r
@@ -163,11 +163,11 @@ IsRootPciHotPlugBus (
 /**\r
   Test whether device path is for root pci hot plug controller\r
   \r
-  @param HpbdevicePath  tested device path\r
+  @param HpbdevicePath  tested device path.\r
   @param HpIndex        Return the index of root hot plug in global array.\r
   \r
-  @retval TRUE  device path is for root pci hot plug controller\r
-  @retval FALSE device path is not for root pci hot plug controller\r
+  @retval TRUE  device path is for root pci hot plug controller.\r
+  @retval FALSE device path is not for root pci hot plug controller.\r
 **/\r
 BOOLEAN\r
 IsRootPciHotPlugController (\r
@@ -195,10 +195,10 @@ IsRootPciHotPlugController (
 /**\r
   Wrapper for creating event object for HPC \r
   \r
-  @param  HpIndex   index of hot plug device in global array\r
-  @param  Event     event object\r
+  @param  HpIndex   index of hot plug device in global array.\r
+  @param  Event     event object.\r
   \r
-  @return status of create event invoken\r
+  @return status of create event invoken.\r
 **/\r
 EFI_STATUS\r
 CreateEventForHpc (\r
@@ -226,7 +226,7 @@ CreateEventForHpc (
 /**\r
   Wait for all root HPC initialized.\r
   \r
-  @param TimeoutInMicroSeconds  microseconds to wait for all root hpc's initialization\r
+  @param TimeoutInMicroSeconds  microseconds to wait for all root hpc's initialization.\r
 **/\r
 EFI_STATUS\r
 AllRootHPCInitialized (\r
@@ -257,7 +257,7 @@ AllRootHPCInitialized (
 \r
     Delay--;\r
 \r
-  } while (Delay);\r
+  } while (Delay > 0);\r
 \r
   return EFI_TIMEOUT;\r
 }\r
@@ -265,10 +265,10 @@ AllRootHPCInitialized (
 /**\r
   Check HPC capability register block\r
   \r
-  @param PciIoDevice PCI device instance\r
+  @param PciIoDevice PCI device instance.\r
   \r
-  @retval EFI_SUCCESS   PCI device is HPC\r
-  @retval EFI_NOT_FOUND PCI device is not HPC\r
+  @retval EFI_SUCCESS   PCI device is HPC.\r
+  @retval EFI_NOT_FOUND PCI device is not HPC.\r
 **/\r
 EFI_STATUS\r
 IsSHPC (\r
@@ -279,7 +279,7 @@ IsSHPC (
   EFI_STATUS  Status;\r
   UINT8       Offset;\r
 \r
-  if (!PciIoDevice) {\r
+  if (PciIoDevice == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -352,7 +352,7 @@ Returns:
       return Status;\r
     }\r
 \r
-    if ((State & EFI_HPC_STATE_ENABLED) && (State & EFI_HPC_STATE_INITIALIZED)) {\r
+    if ((State & EFI_HPC_STATE_ENABLED) != 0 && (State & EFI_HPC_STATE_INITIALIZED) != 0) {\r
       PciIoDevice->ResourcePaddingDescriptors = Descriptors;\r
       PciIoDevice->PaddingAttributes          = Attributes;\r
     }\r
@@ -366,10 +366,10 @@ Returns:
 /**\r
   Test whether PCI device is hot plug bus.\r
   \r
-  @param PciIoDevice  PCI device instance\r
+  @param PciIoDevice  PCI device instance.\r
   \r
-  @retval EFI_SUCCESS   PCI device is hot plug bus\r
-  @retval EFI_NOT_FOUND PCI device is not hot plug bus\r
+  @retval EFI_SUCCESS   PCI device is hot plug bus.\r
+  @retval EFI_NOT_FOUND PCI device is not hot plug bus.\r
 **/\r
 EFI_STATUS\r
 IsPciHotPlugBus (\r