]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
fixed ECC and Klocwork issues.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciEnumerator.c
index 43e7cb062ef0d48f76833258f44359d299ce0b67..687e007b5a3252c6bbc42aae55d93c4c53bffcd5 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
 All rights reserved. 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
@@ -1005,7 +1005,7 @@ PciHostBridgeAdjustAllocation (
   @param PMem32Node       Pointer to instance of 32-bit Pmemory resource node\r
   @param Mem64Node        Pointer to instance of 64-bit memory resource node\r
   @param PMem64Node       Pointer to instance of 64-bit Pmemory resource node\r
-  @param pConfig          outof buffer holding new constructed APCI resource requestor\r
+  @param Config           Output buffer holding new constructed APCI resource requestor\r
 **/\r
 EFI_STATUS\r
 ConstructAcpiResourceRequestor (\r
@@ -1015,7 +1015,7 @@ ConstructAcpiResourceRequestor (
   IN PCI_RESOURCE_NODE  *PMem32Node,\r
   IN PCI_RESOURCE_NODE  *Mem64Node,\r
   IN PCI_RESOURCE_NODE  *PMem64Node,\r
-  OUT VOID              **pConfig\r
+  OUT VOID              **Config\r
   )\r
 {\r
   UINT8                             NumConfig;\r
@@ -1027,7 +1027,7 @@ ConstructAcpiResourceRequestor (
   NumConfig = 0;\r
   Aperture  = 0;\r
 \r
-  *pConfig  = NULL;\r
+  *Config  = NULL;\r
 \r
   //\r
   // if there is io request, add to the io aperture\r
@@ -1228,26 +1228,27 @@ ConstructAcpiResourceRequestor (
     PtrEnd->Checksum  = 0;\r
   }\r
 \r
-  *pConfig = Configuration;\r
+  *Config = Configuration;\r
 \r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
-  Get resource base from a acpi configuration descriptor.\r
+  Get resource base from an acpi configuration descriptor.\r
   \r
-  @param pConfig      an acpi configuration descriptor.\r
+  @param Config       an acpi configuration descriptor.\r
   @param IoBase       output of I/O resource base address.\r
   @param Mem32Base    output of 32-bit memory base address.\r
   @param PMem32Base   output of 32-bit pmemory base address.\r
   @param Mem64Base    output of 64-bit memory base address.\r
   @param PMem64Base   output of 64-bit pmemory base address.\r
   \r
-  @return EFI_SUCCESS  Success operation.\r
+  @return EFI_SUCCESS    Get resource base address successfully.\r
+\r
 **/\r
 EFI_STATUS\r
 GetResourceBase (\r
-  IN VOID     *pConfig,\r
+  IN VOID     *Config,\r
   OUT UINT64  *IoBase,\r
   OUT UINT64  *Mem32Base,\r
   OUT UINT64  *PMem32Base,\r
@@ -1259,13 +1260,15 @@ GetResourceBase (
   EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Ptr;\r
   UINT64                            ResStatus;\r
 \r
+  ASSERT (Config != NULL);\r
+\r
   *IoBase     = 0xFFFFFFFFFFFFFFFFULL;\r
   *Mem32Base  = 0xFFFFFFFFFFFFFFFFULL;\r
   *PMem32Base = 0xFFFFFFFFFFFFFFFFULL;\r
   *Mem64Base  = 0xFFFFFFFFFFFFFFFFULL;\r
   *PMem64Base = 0xFFFFFFFFFFFFFFFFULL;\r
 \r
-  Temp        = (UINT8 *) pConfig;\r
+  Temp        = (UINT8 *) Config;\r
 \r
   while (*Temp == ACPI_ADDRESS_SPACE_DESCRIPTOR) {\r
 \r