]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/8254TimerDxe/Timer.c
ShellPkg/Mm: Fix build warnings
[mirror_edk2.git] / PcAtChipsetPkg / 8254TimerDxe / Timer.c
index 6cf99d5e82ee9e30e4ec3fee9084fb23ee2b951a..a7f49470021c22920690e1ba8cac649f95b83f53 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Timer Architectural Protocol as defined in the DXE CIS\r
 \r
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -69,7 +69,7 @@ SetPitCount (
 }\r
 \r
 /**\r
-  8254 Timer #0 Interrupt Handler\r
+  8254 Timer #0 Interrupt Handler.\r
 \r
   @param InterruptType    The type of interrupt that occured\r
   @param SystemContext    A pointer to the system context when the interrupt occured\r
@@ -87,9 +87,9 @@ TimerInterruptHandler (
 \r
   mLegacy8259->EndOfInterrupt (mLegacy8259, Efi8259Irq0);\r
 \r
-  if (mTimerNotifyFunction) {\r
+  if (mTimerNotifyFunction != NULL) {\r
     //\r
-    // BUGBUG : This does not handle missed timer interrupts\r
+    // @bug : This does not handle missed timer interrupts\r
     //\r
     mTimerNotifyFunction (mTimerPeriod);\r
   }\r
@@ -219,9 +219,7 @@ TimerDriverSetTimerPeriod (
     //\r
     if (TimerCount >= 65536) {\r
       TimerCount = 0;\r
-      if (TimerPeriod >= DEFAULT_TIMER_TICK_DURATION) {\r
-        TimerPeriod = DEFAULT_TIMER_TICK_DURATION;\r
-      }\r
+      TimerPeriod = MAX_TIMER_TICK_DURATION;\r
     }\r
     //\r
     // Program the 8254 timer with the new count value\r
@@ -311,9 +309,9 @@ TimerDriverGenerateSoftInterrupt (
     //\r
     OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);\r
 \r
-    if (mTimerNotifyFunction) {\r
+    if (mTimerNotifyFunction != NULL) {\r
       //\r
-      // BUGBUG : This does not handle missed timer interrupts\r
+      // @bug : This does not handle missed timer interrupts\r
       //\r
       mTimerNotifyFunction (mTimerPeriod);\r
     }\r