]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fixed For Review
authorhfang <hfang@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 13 Jan 2009 07:28:52 +0000 (07:28 +0000)
committerhfang <hfang@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 13 Jan 2009 07:28:52 +0000 (07:28 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7253 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c
IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeData.h
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.c
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciPowerManagement.c
IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c

index a91eb174c1fcd70b887b3b24621235e1188b9f29..4a57f11bfea05ba34cbedfeac573ded43bb7e217 100644 (file)
@@ -2493,9 +2493,9 @@ DoAtaUdma (
                         );\r
 \r
     if (UdmaOp == AtaUdmaReadExtOp || UdmaOp == AtaUdmaReadOp) {\r
-      RegisterValue |= BMIC_nREAD;\r
+      RegisterValue |= BMIC_NREAD;\r
     } else {\r
-      RegisterValue &= ~((UINT8) BMIC_nREAD);\r
+      RegisterValue &= ~((UINT8) BMIC_NREAD);\r
     }\r
 \r
     IdeDev->PciIo->Io.Write (\r
index e4bc4f71fd53bc880a125f95c358a7b8d85d39fc..47385c71a4bb9e6fa5c9d682fc858f8e7e8eb471 100644 (file)
@@ -75,7 +75,7 @@ typedef union {
 typedef union {\r
   UINT16  AltStatus;      /* when read */\r
   UINT16  DeviceControl;  /* when write */\r
-} IDE_AltStatus_OR_DeviceControl;\r
+} IDE_ALTSTATUS_OR_DEVICECONTROL;\r
 \r
 //\r
 // IDE registers set\r
@@ -90,7 +90,7 @@ typedef struct {
   UINT16                          Head;\r
   IDE_CMD_OR_STATUS               Reg;\r
 \r
-  IDE_AltStatus_OR_DeviceControl  Alt;\r
+  IDE_ALTSTATUS_OR_DEVICECONTROL  Alt;\r
   UINT16                          DriveAddress;\r
 \r
   UINT16                          MasterSlave;\r
@@ -119,7 +119,7 @@ typedef struct {
 //\r
 // Bus Master Reg\r
 //\r
-#define BMIC_nREAD      BIT3\r
+#define BMIC_NREAD      BIT3\r
 #define BMIC_START      BIT0\r
 #define BMIS_INTERRUPT  BIT2\r
 #define BMIS_ERROR      BIT1\r
index 506e1803dc3be9b5c6343bc3e3cddf925f0d1736..af11143e92af2c66b310be2049dbbcd906572657 100644 (file)
@@ -89,7 +89,7 @@ PciCapabilitySupport (
   )\r
 {\r
 \r
-  if (PciIoDevice->Pci.Hdr.Status & EFI_PCI_STATUS_CAPABILITY) {\r
+  if ((PciIoDevice->Pci.Hdr.Status & EFI_PCI_STATUS_CAPABILITY) != 0) {\r
     return TRUE;\r
   }\r
 \r
index c3036510ff61c42affef9a5b06f5ee4a74f2e3d1..092c3b69015882f343f99b033e92d535f96a1be1 100644 (file)
@@ -142,7 +142,7 @@ PciRootBridgeEnumerator (
   )\r
 {\r
   EFI_STATUS                        Status;\r
-  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *pConfiguration;\r
+  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Configuration;\r
   UINT8                             SubBusNumber;\r
   UINT8                             StartBusNumber;\r
   UINT8                             PaddedBusRange;\r
@@ -169,7 +169,7 @@ PciRootBridgeEnumerator (
   Status = PciResAlloc->StartBusEnumeration (\r
                           PciResAlloc,\r
                           RootBridgeHandle,\r
-                          (VOID **) &pConfiguration\r
+                          (VOID **) &Configuration\r
                           );\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -179,8 +179,8 @@ PciRootBridgeEnumerator (
   //\r
   // Get the bus number to start with\r
   //\r
-  StartBusNumber = (UINT8) (pConfiguration->AddrRangeMin);\r
-  PaddedBusRange  = (UINT8) (pConfiguration->AddrRangeMax);\r
+  StartBusNumber = (UINT8) (Configuration->AddrRangeMin);\r
+  PaddedBusRange  = (UINT8) (Configuration->AddrRangeMax);\r
 \r
   //\r
   // Initialize the subordinate bus number\r
@@ -200,7 +200,7 @@ PciRootBridgeEnumerator (
   //\r
   Status = PciScanBus (\r
             RootBridgeDev,\r
-            (UINT8) (pConfiguration->AddrRangeMin),\r
+            (UINT8) (Configuration->AddrRangeMin),\r
             &SubBusNumber,\r
             &PaddedBusRange\r
             );\r
@@ -213,7 +213,7 @@ PciRootBridgeEnumerator (
   //\r
   // Assign max bus number scanned\r
   //\r
-  pConfiguration->AddrLen = SubBusNumber - StartBusNumber + 1 + PaddedBusRange;\r
+  Configuration->AddrLen = SubBusNumber - StartBusNumber + 1 + PaddedBusRange;\r
 \r
   //\r
   // Set bus number\r
@@ -221,10 +221,10 @@ PciRootBridgeEnumerator (
   Status = PciResAlloc->SetBusNumbers (\r
                           PciResAlloc,\r
                           RootBridgeHandle,\r
-                          pConfiguration\r
+                          Configuration\r
                           );\r
   \r
-  gBS->FreePool (pConfiguration);\r
+  gBS->FreePool (Configuration);\r
   \r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -606,19 +606,19 @@ GetResourceAllocationStatus (
 \r
   UINT8                             *Temp;\r
   UINT64                            ResStatus;\r
-  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *ptr;\r
+  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *ACPIAddressDesc;\r
 \r
   Temp = (UINT8 *) AcpiConfig;\r
 \r
   while (*Temp == ACPI_ADDRESS_SPACE_DESCRIPTOR) {\r
 \r
-    ptr       = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) Temp;\r
-    ResStatus = ptr->AddrTranslationOffset;\r
+    ACPIAddressDesc       = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) Temp;\r
+    ResStatus = ACPIAddressDesc->AddrTranslationOffset;\r
 \r
-    switch (ptr->ResType) {\r
+    switch (ACPIAddressDesc->ResType) {\r
     case 0:\r
-      if (ptr->AddrSpaceGranularity == 32) {\r
-        if (ptr->SpecificFlag == 0x06) {\r
+      if (ACPIAddressDesc->AddrSpaceGranularity == 32) {\r
+        if (ACPIAddressDesc->SpecificFlag == 0x06) {\r
           //\r
           // Pmem32\r
           //\r
@@ -631,8 +631,8 @@ GetResourceAllocationStatus (
         }\r
       }\r
 \r
-      if (ptr->AddrSpaceGranularity == 64) {\r
-        if (ptr->SpecificFlag == 0x06) {\r
+      if (ACPIAddressDesc->AddrSpaceGranularity == 64) {\r
+        if (ACPIAddressDesc->SpecificFlag == 0x06) {\r
           //\r
           // PMem64\r
           //\r
@@ -1286,7 +1286,7 @@ GetResourceBase (
         // Check to see the granularity\r
         //\r
         if (Ptr->AddrSpaceGranularity == 32) {\r
-          if (Ptr->SpecificFlag & 0x06) {\r
+          if ((Ptr->SpecificFlag & 0x06) != 0) {\r
             *PMem32Base = Ptr->AddrRangeMin;\r
           } else {\r
             *Mem32Base = Ptr->AddrRangeMin;\r
@@ -1294,7 +1294,7 @@ GetResourceBase (
         }\r
 \r
         if (Ptr->AddrSpaceGranularity == 64) {\r
-          if (Ptr->SpecificFlag & 0x06) {\r
+          if ((Ptr->SpecificFlag & 0x06) != 0) {\r
             *PMem64Base = Ptr->AddrRangeMin;\r
           } else {\r
             *Mem64Base = Ptr->AddrRangeMin;\r
index 7d30797f76bc67b59e7a1f4a398df9c43b2a7df4..95d81679530e6981ae74154a1f73d65e7b2e6d8b 100644 (file)
@@ -66,7 +66,7 @@ EfiCompareDevicePath (
     return FALSE;\r
   }\r
 \r
-  if (CompareMem (DevicePath1, DevicePath2, Size1)) {\r
+  if (CompareMem (DevicePath1, DevicePath2, Size1) != 0) {\r
     return FALSE;\r
   }\r
 \r
index fd8eaf43257c705d5e08e8eaa24e50d5a7482c4e..fca1766d3209d2fc48d703fb60582f957eebfe95 100644 (file)
@@ -1777,7 +1777,7 @@ PciHostBridgeEnumerator (
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL   *PciRootBridgeIo;\r
   UINT16                            MinBus;\r
   EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptors;\r
-  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *pConfiguration;\r
+  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Configuration;\r
   UINT8                             StartBusNumber;\r
   LIST_ENTRY                        RootBridgeList;\r
   LIST_ENTRY                        *Link;\r
@@ -1846,7 +1846,7 @@ PciHostBridgeEnumerator (
         Status = PciResAlloc->StartBusEnumeration (\r
                                 PciResAlloc,\r
                                 RootBridgeHandle,\r
-                                (VOID **) &pConfiguration\r
+                                (VOID **) &Configuration\r
                                 );\r
         if (EFI_ERROR (Status)) {\r
           return Status;\r
@@ -1855,14 +1855,14 @@ PciHostBridgeEnumerator (
         //\r
         // Get the bus number to start with\r
         //\r
-        StartBusNumber  = (UINT8) (pConfiguration->AddrRangeMin);\r
+        StartBusNumber  = (UINT8) (Configuration->AddrRangeMin);\r
 \r
         ResetAllPpbBusNumber (\r
           RootBridgeDev,\r
           StartBusNumber\r
         );\r
 \r
-        gBS->FreePool (pConfiguration);\r
+        gBS->FreePool (Configuration);\r
         Link = GetNextNode (&RootBridgeList, Link);\r
         DestroyRootBridge (RootBridgeDev);\r
       }\r
index 379a2e4cd43311f85220ce212bd29e2c176e7cd7..ea9ac25b13195ce6ce7d3d154d263bb28e2bdf4b 100644 (file)
@@ -144,7 +144,7 @@ LoadOpRomImage (
   UINT16                    OffsetPcir;\r
   UINT32                    RomBarOffset;\r
   UINT32                    RomBar;\r
-  EFI_STATUS                retStatus;\r
+  EFI_STATUS                RetStatus;\r
   BOOLEAN                   FirstCheck;\r
   UINT8                     *Image;\r
   PCI_EXPANSION_ROM_HEADER  *RomHeader;\r
@@ -201,7 +201,7 @@ LoadOpRomImage (
   RomDecode (PciDevice, RomBarIndex, RomBar, TRUE);\r
 \r
   RomBarOffset  = RomBar;\r
-  retStatus     = EFI_NOT_FOUND;\r
+  RetStatus     = EFI_NOT_FOUND;\r
   FirstCheck    = TRUE;\r
 \r
   do {\r
@@ -249,7 +249,7 @@ LoadOpRomImage (
   }\r
 \r
   if (RomImageSize > 0) {\r
-    retStatus = EFI_SUCCESS;\r
+    RetStatus = EFI_SUCCESS;\r
     Image     = AllocatePool ((UINT32) RomImageSize);\r
     if (Image == NULL) {\r
       RomDecode (PciDevice, RomBarIndex, RomBar, FALSE);\r
@@ -296,7 +296,7 @@ LoadOpRomImage (
   gBS->FreePool (RomHeader);\r
   gBS->FreePool (RomPcir);\r
 \r
-  return retStatus;\r
+  return RetStatus;\r
 }\r
 \r
 /**\r
@@ -401,7 +401,7 @@ ProcessOpRomImage (
   UINT8                         *RomBarOffset;\r
   EFI_HANDLE                    ImageHandle;\r
   EFI_STATUS                    Status;\r
-  EFI_STATUS                    retStatus;\r
+  EFI_STATUS                    RetStatus;\r
   BOOLEAN                       FirstCheck;\r
   BOOLEAN                       SkipImage;\r
   UINT32                        DestinationSize;\r
@@ -422,7 +422,7 @@ ProcessOpRomImage (
   //\r
   RomBar        = PciDevice->PciIo.RomImage;\r
   RomBarOffset  = (UINT8 *) RomBar;\r
-  retStatus     = EFI_NOT_FOUND;\r
+  RetStatus     = EFI_NOT_FOUND;\r
   FirstCheck    = TRUE;\r
 \r
   do {\r
@@ -542,7 +542,7 @@ ProcessOpRomImage (
                 (UINT64) (UINTN) PciDevice->PciIo.RomImage,\r
                 PciDevice->PciIo.RomSize\r
                 );\r
-              retStatus = EFI_SUCCESS;\r
+              RetStatus = EFI_SUCCESS;\r
             }\r
           }\r
         }\r
@@ -557,7 +557,7 @@ ProcessOpRomImage (
 \r
   } while (((Indicator & 0x80) == 0x00) && ((UINTN) (RomBarOffset - (UINT8 *) RomBar) < PciDevice->RomSize));\r
 \r
-  return retStatus;\r
+  return RetStatus;\r
 \r
 }\r
 \r
index 04d188e9ab1375c6d5a1bcc37d6de5a3829b89dd..5ebbaf910cbbf18878e8456705eda243fc9a1957 100644 (file)
@@ -30,7 +30,7 @@ ResetPowerManagementFeature (
 {\r
   EFI_STATUS  Status;\r
   UINT8       PowerManagementRegBlock;\r
-  UINT16      PMCSR;\r
+  UINT16      PowerManagementCSR;\r
 \r
   PowerManagementRegBlock = 0;\r
 \r
@@ -48,7 +48,7 @@ ResetPowerManagementFeature (
   //\r
   // Turn off the PWE assertion and put the device into D0 State\r
   //\r
-  PMCSR = 0x8000;\r
+  PowerManagementCSR = 0x8000;\r
 \r
   //\r
   // Write PMCSR\r
@@ -58,7 +58,7 @@ ResetPowerManagementFeature (
                EfiPciIoWidthUint16,\r
                PowerManagementRegBlock + 4,\r
                1,\r
-               &PMCSR\r
+               &PowerManagementCSR\r
              );\r
 \r
   return EFI_SUCCESS;\r
index b40b01ea6fff224e87583ff27f05a94e11a24742..d761832bf6b93c8092acaee3300838b2fa69ed1c 100644 (file)
@@ -194,7 +194,7 @@ CalculateApertureIo16 (
   UINT64            Aperture;\r
   LIST_ENTRY        *CurrentLink;\r
   PCI_RESOURCE_NODE *Node;\r
-  UINT64            offset;\r
+  UINT64            Offset;\r
   BOOLEAN           IsaEnable;\r
   BOOLEAN           VGAEnable;\r
 \r
@@ -231,11 +231,11 @@ CalculateApertureIo16 (
     //\r
     // Consider the aperture alignment\r
     //\r
-    offset = Aperture & (Node->Alignment);\r
+    Offset = Aperture & (Node->Alignment);\r
 \r
-    if (offset != 0) {\r
+    if (Offset != 0) {\r
 \r
-      Aperture = Aperture + (Node->Alignment + 1) - offset;\r
+      Aperture = Aperture + (Node->Alignment + 1) - Offset;\r
 \r
     }\r
 \r
@@ -256,18 +256,18 @@ CalculateApertureIo16 (
             &Aperture,\r
             Node->Length               \r
             );\r
-          offset = Aperture & (Node->Alignment);\r
-          if (offset != 0) {\r
-            Aperture = Aperture + (Node->Alignment + 1) - offset;\r
+          Offset = Aperture & (Node->Alignment);\r
+          if (Offset != 0) {\r
+            Aperture = Aperture + (Node->Alignment + 1) - Offset;\r
           }\r
         } else if (VGAEnable) {\r
           SkipVGAAperture (\r
             &Aperture,\r
             Node->Length\r
             );\r
-          offset = Aperture & (Node->Alignment);\r
-          if (offset != 0) {\r
-            Aperture = Aperture + (Node->Alignment + 1) - offset;\r
+          Offset = Aperture & (Node->Alignment);\r
+          if (Offset != 0) {\r
+            Aperture = Aperture + (Node->Alignment + 1) - Offset;\r
           }\r
         }\r
       }\r
@@ -287,10 +287,10 @@ CalculateApertureIo16 (
   // At last, adjust the aperture with the bridge's\r
   // alignment\r
   //\r
-  offset = Aperture & (Bridge->Alignment);\r
+  Offset = Aperture & (Bridge->Alignment);\r
 \r
-  if (offset != 0) {\r
-    Aperture = Aperture + (Bridge->Alignment + 1) - offset;\r
+  if (Offset != 0) {\r
+    Aperture = Aperture + (Bridge->Alignment + 1) - Offset;\r
   }\r
 \r
   Bridge->Length = Aperture;\r
@@ -326,7 +326,7 @@ CalculateResourceAperture (
   LIST_ENTRY        *CurrentLink;\r
   PCI_RESOURCE_NODE *Node;\r
 \r
-  UINT64            offset;\r
+  UINT64            Offset;\r
 \r
   Aperture = 0;\r
 \r
@@ -351,11 +351,11 @@ CalculateResourceAperture (
     // Apply padding resource if available\r
     //\r
         \r
-    offset = Aperture & (Node->Alignment);\r
+    Offset = Aperture & (Node->Alignment);\r
 \r
-    if (offset != 0) {\r
+    if (Offset != 0) {\r
 \r
-      Aperture = Aperture + (Node->Alignment + 1) - offset;\r
+      Aperture = Aperture + (Node->Alignment + 1) - Offset;\r
 \r
     }\r
 \r
@@ -381,9 +381,9 @@ CalculateResourceAperture (
   // At last, adjust the aperture with the bridge's\r
   // alignment\r
   //\r
-  offset = Aperture & (Bridge->Alignment);\r
-  if (offset != 0) {\r
-    Aperture = Aperture + (Bridge->Alignment + 1) - offset;\r
+  Offset = Aperture & (Bridge->Alignment);\r
+  if (Offset != 0) {\r
+    Aperture = Aperture + (Bridge->Alignment + 1) - Offset;\r
   }\r
 \r
   //\r
@@ -2017,7 +2017,7 @@ ApplyResourcePadding (
         // prefechable\r
         //\r
         if (Ptr->SpecificFlag == 0x6) {\r
-          if (Ptr->AddrLen) {\r
+          if (Ptr->AddrLen != 0) {\r
             Node = CreateResourceNode (\r
                     PciDev,\r
                     Ptr->AddrLen,\r
@@ -2040,7 +2040,7 @@ ApplyResourcePadding (
         // Non-prefechable\r
         //\r
         if (Ptr->SpecificFlag == 0) {\r
-          if (Ptr->AddrLen) {\r
+          if (Ptr->AddrLen != 0) {\r
             Node = CreateResourceNode (\r
                     PciDev,\r
                     Ptr->AddrLen,\r
@@ -2066,7 +2066,7 @@ ApplyResourcePadding (
         // prefechable\r
         //\r
         if (Ptr->SpecificFlag == 0x6) {\r
-          if (Ptr->AddrLen) {\r
+          if (Ptr->AddrLen != 0) {\r
             Node = CreateResourceNode (\r
                     PciDev,\r
                     Ptr->AddrLen,\r
@@ -2089,7 +2089,7 @@ ApplyResourcePadding (
         // Non-prefechable\r
         //\r
         if (Ptr->SpecificFlag == 0) {\r
-          if (Ptr->AddrLen) {\r
+          if (Ptr->AddrLen != 0) {\r
             Node = CreateResourceNode (\r
                     PciDev,\r
                     Ptr->AddrLen,\r