]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
Improve coding style in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciEnumeratorSupport.c
index adf36a5b77a2d4cd22af98bdec95e92fc1bdd2e6..7d08246711b1fd9209edbbf5a1dda00508add3f8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   PCI emumeration support functions implementation for PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation\r
+Copyright (c) 2006 - 2010, 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
@@ -1420,7 +1420,7 @@ PciIovParseVfBar (
   }\r
 \r
   PciIoDevice->VfPciBar[BarIndex].Offset = (UINT8) Offset;\r
-  if (Value & 0x01) {\r
+  if ((Value & 0x01) != 0) {\r
     //\r
     // Device I/Os. Impossible\r
     //\r
@@ -1439,7 +1439,7 @@ PciIovParseVfBar (
     //memory space; anywhere in 32 bit address space\r
     //\r
     case 0x00:\r
-      if (Value & 0x08) {\r
+      if ((Value & 0x08) != 0) {\r
         PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypePMem32;\r
       } else {\r
         PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypeMem32;\r
@@ -1465,7 +1465,7 @@ PciIovParseVfBar (
     // memory space; anywhere in 64 bit address space\r
     //\r
     case 0x04:\r
-      if (Value & 0x08) {\r
+      if ((Value & 0x08) != 0) {\r
         PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypePMem64;\r
       } else {\r
         PciIoDevice->VfPciBar[BarIndex].BarType = PciBarTypeMem64;\r
@@ -2040,7 +2040,7 @@ CreatePciIoDevice (
                  );\r
     DEBUG ((EFI_D_INFO, "PCI-IOV B%x.D%x.F%x - SupportedPageSize - 0x%x\n", (UINTN)Bus, (UINTN)Device, (UINTN)Func, PciIoDevice->SystemPageSize));\r
 \r
-    PciIoDevice->SystemPageSize = (PcdGet32(PcdSrIovSystemPageSize) & PciIoDevice->SystemPageSize);\r
+    PciIoDevice->SystemPageSize = (FixedPcdGet32(PcdSrIovSystemPageSize) & PciIoDevice->SystemPageSize);\r
     ASSERT (PciIoDevice->SystemPageSize != 0);\r
 \r
     PciIo->Pci.Write (\r
@@ -2062,7 +2062,7 @@ CreatePciIoDevice (
   if ((PciIoDevice->SrIovCapabilityOffset != 0) && ((FeaturePcdGet(PcdSrIovSupport)& EFI_PCI_IOV_POLICY_SRIOV) != 0)) {\r
     UINT16    VFStride;\r
     UINT16    FirstVFOffset;\r
-    UINT32    PFRID;\r
+    UINT32    PFRid;\r
     UINT32    LastVF;\r
 \r
     //\r
@@ -2098,8 +2098,8 @@ CreatePciIoDevice (
     //\r
     // Calculate LastVF\r
     //\r
-    PFRID = EFI_PCI_RID(Bus, Device, Func);\r
-    LastVF = PFRID + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;\r
+    PFRid = EFI_PCI_RID(Bus, Device, Func);\r
+    LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;\r
 \r
     //\r
     // Calculate ReservedBusNum for this PF\r