]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PcAtChipsetPkg AcpiTimerLib: Fix a logic error
authorwang xiaofeng <winggundum82@163.com>
Fri, 13 May 2016 03:20:28 +0000 (11:20 +0800)
committerStar Zeng <star.zeng@intel.com>
Sun, 15 May 2016 09:45:25 +0000 (17:45 +0800)
if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister) &
EnableMask) != EnableMask)) {

The bracket place is not right, I think it should be

if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister)) &
EnableMask) != EnableMask)

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: wang xiaofeng <winggundum82@163.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
PcAtChipsetPkg/Library/AcpiTimerLib/AcpiTimerLib.c

index ad855fe4f517f6e0c4a814239d63152f3ae4781e..806a4f7ce24c7431b3173328948795ef09df9753 100644 (file)
@@ -89,7 +89,7 @@ AcpiTimerLibConstructor (
   //\r
   // If ACPI I/O space is not enabled yet, program ACPI I/O base address and enable it.\r
   //\r
-  if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister) & EnableMask) != EnableMask)) {\r
+  if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister)) & EnableMask) != EnableMask) {\r
     PciWrite16 (\r
       PCI_LIB_ADDRESS (Bus, Device, Function, PcdGet16 (PcdAcpiIoPciBarRegisterOffset)),\r
       PcdGet16 (PcdAcpiIoPortBaseAddress)\r