]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
Fixup for review
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciDeviceSupport.c
index 584f4f5c9ef07dffa556e22d0a4b7ce4dbf97078..3f72a71d731c6ffbbf96f091ea5b769715f351e0 100644 (file)
@@ -1,4 +1,4 @@
-/**@file\r
+/** @file\r
 \r
 Copyright (c) 2006, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 LIST_ENTRY  gPciDevicePool;\r
 \r
 /**\r
-  Initialize the gPciDevicePool\r
+  Initialize the gPciDevicePool.\r
 **/\r
 EFI_STATUS\r
 InitializePciDevicePool (\r
@@ -75,7 +75,7 @@ InsertPciDevice (
 /**\r
   Destroy root bridge and remove it from deivce tree.\r
   \r
-  @param RootBridge   The bridge want to be removed\r
+  @param RootBridge   The bridge want to be removed.\r
   \r
 **/\r
 EFI_STATUS\r
@@ -174,7 +174,7 @@ DestroyRootBridgeByHandle (
 \r
   CurrentLink = gPciDevicePool.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+  while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
     Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
 \r
     if (Temp->Handle == Controller) {\r
@@ -456,7 +456,7 @@ DeRegisterPciDevice (
 \r
       CurrentLink = PciIoDevice->ChildList.ForwardLink;\r
 \r
-      while (CurrentLink && CurrentLink != &PciIoDevice->ChildList) {\r
+      while (CurrentLink != NULL && CurrentLink != &PciIoDevice->ChildList) {\r
         Node    = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
         Status  = DeRegisterPciDevice (Controller, Node->Handle);\r
 \r
@@ -571,7 +571,7 @@ StartPciDevicesOnBridge (
 \r
   CurrentLink = RootBridge->ChildList.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &RootBridge->ChildList) {\r
+  while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
 \r
     PciIoDevice = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
     if (RemainingDevicePath != NULL) {\r
@@ -728,7 +728,7 @@ StartPciDevices (
 \r
   CurrentLink = gPciDevicePool.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+  while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
 \r
     RootBridge = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
     //\r
@@ -839,11 +839,11 @@ CreateRootBridge (
 }\r
 \r
 /**\r
-  Get root bridge device instance by specific handle\r
+  Get root bridge device instance by specific handle.\r
 \r
-  @param RootBridgeHandle    Given root bridge handle\r
+  @param RootBridgeHandle    Given root bridge handle.\r
 \r
-  @return root bridge device instance\r
+  @return root bridge device instance.\r
 **/\r
 PCI_IO_DEVICE *\r
 GetRootBridgeByHandle (\r
@@ -855,7 +855,7 @@ GetRootBridgeByHandle (
 \r
   CurrentLink = gPciDevicePool.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+  while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
 \r
     RootBridgeDev = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
     if (RootBridgeDev->Handle == RootBridgeHandle) {\r
@@ -869,12 +869,12 @@ GetRootBridgeByHandle (
 }\r
 \r
 /**\r
-  Judege whether Pci device existed\r
+  Judege whether Pci device existed.\r
   \r
-  @param Bridge       Parent bridege instance \r
-  @param PciIoDevice  Device instance\r
+  @param Bridge       Parent bridege instance.\r
+  @param PciIoDevice  Device instance.\r
   \r
-  @return whether Pci device existed\r
+  @return whether Pci device existed.\r
 **/\r
 BOOLEAN\r
 PciDeviceExisted (\r
@@ -888,7 +888,7 @@ PciDeviceExisted (
 \r
   CurrentLink = Bridge->ChildList.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &Bridge->ChildList) {\r
+  while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {\r
 \r
     Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
 \r
@@ -909,11 +909,11 @@ PciDeviceExisted (
 }\r
 \r
 /**\r
-  Active VGA device\r
+  Active VGA device.\r
   \r
-  @param VgaDevice device instance for VGA\r
+  @param VgaDevice device instance for VGA.\r
   \r
-  @return device instance\r
+  @return device instance.\r
 **/\r
 PCI_IO_DEVICE *\r
 ActiveVGADeviceOnTheSameSegment (\r
@@ -925,7 +925,7 @@ ActiveVGADeviceOnTheSameSegment (
 \r
   CurrentLink = gPciDevicePool.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+  while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
 \r
     Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
 \r
@@ -945,11 +945,11 @@ ActiveVGADeviceOnTheSameSegment (
 }\r
 \r
 /**\r
-  Active VGA device on root bridge\r
+  Active VGA device on root bridge.\r
   \r
-  @param RootBridge  Root bridge device instance\r
+  @param RootBridge  Root bridge device instance.\r
   \r
-  @return VGA device instance\r
+  @return VGA device instance.\r
 **/\r
 PCI_IO_DEVICE *\r
 ActiveVGADeviceOnTheRootBridge (\r
@@ -961,7 +961,7 @@ ActiveVGADeviceOnTheRootBridge (
 \r
   CurrentLink = RootBridge->ChildList.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &RootBridge->ChildList) {\r
+  while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
 \r
     Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
 \r
@@ -969,7 +969,7 @@ ActiveVGADeviceOnTheRootBridge (
         (Temp->Attributes &\r
          (EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY |\r
           EFI_PCI_IO_ATTRIBUTE_VGA_IO     |\r
-          EFI_PCI_IO_ATTRIBUTE_VGA_IO_16))) {\r
+          EFI_PCI_IO_ATTRIBUTE_VGA_IO_16)) != 0) {\r
       return Temp;\r
     }\r
 \r
@@ -989,13 +989,13 @@ ActiveVGADeviceOnTheRootBridge (
 }\r
 \r
 /**\r
-  Get HPC PCI address according to its device path\r
-  @param PciRootBridgeIo   Root bridege Io instance\r
-  @param HpcDevicePath     Given searching device path\r
-  @param PciAddress        Buffer holding searched result\r
+  Get HPC PCI address according to its device path.\r
+  @param PciRootBridgeIo   Root bridege Io instance.\r
+  @param HpcDevicePath     Given searching device path.\r
+  @param PciAddress        Buffer holding searched result.\r
   \r
   @retval EFI_NOT_FOUND Can not find the specific device path.\r
-  @retval EFI_SUCCESS   Success to get the device path\r
+  @retval EFI_SUCCESS   Success to get the device path.\r
 **/\r
 EFI_STATUS\r
 GetHpcPciAddress (\r
@@ -1041,7 +1041,7 @@ GetHpcPciAddress (
 \r
   CurrentLink = gPciDevicePool.ForwardLink;\r
 \r
-  while (CurrentLink && CurrentLink != &gPciDevicePool) {\r
+  while (CurrentLink != NULL && CurrentLink != &gPciDevicePool) {\r
 \r
     RootBridge = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
     //\r
@@ -1068,10 +1068,10 @@ GetHpcPciAddress (
 }\r
 \r
 /**\r
-  Get HPC PCI address according to its device path\r
-  @param RootBridge           Root bridege Io instance\r
-  @param RemainingDevicePath  Given searching device path\r
-  @param PciAddress           Buffer holding searched result\r
+  Get HPC PCI address according to its device path.\r
+  @param RootBridge           Root bridege Io instance.\r
+  @param RemainingDevicePath  Given searching device path.\r
+  @param PciAddress           Buffer holding searched result.\r
   \r
   @retval EFI_NOT_FOUND Can not find the specific device path.\r
 **/\r
@@ -1099,7 +1099,7 @@ GetHpcPciAddressFromRootBridge (
     CurrentLink   = RootBridge->ChildList.ForwardLink;\r
     Node.DevPath  = CurrentDevicePath;\r
 \r
-    while (CurrentLink && CurrentLink != &RootBridge->ChildList) {\r
+    while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
       Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
 \r
       if (Node.Pci->Device   == Temp->DeviceNumber &&\r