]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PcAtChipsetPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
authorMichael D Kinney <michael.d.kinney@intel.com>
Sun, 5 Dec 2021 22:33:56 +0000 (14:33 -0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 7 Dec 2021 17:24:28 +0000 (17:24 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767

Update use of DEBUG_CODE(Expression) if Expression is a complex code
block with if/while/for/case statements that use {}.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
PcAtChipsetPkg/HpetTimerDxe/HpetTimer.c

index cbe986ebfd9f0ec9074039728edac902e6a8b388..3adc6d2365a9e16745b884bb7476ae7d61a0570e 100644 (file)
@@ -800,7 +800,7 @@ TimerDriverInitialize (
   //\r
   // Dump HPET Configuration Information\r
   //\r
-  DEBUG_CODE (\r
+  DEBUG_CODE_BEGIN ();\r
     DEBUG ((DEBUG_INFO, "HPET Base Address = 0x%08x\n", PcdGet32 (PcdHpetBaseAddress)));\r
     DEBUG ((DEBUG_INFO, "  HPET_GENERAL_CAPABILITIES_ID  = 0x%016lx\n", mHpetGeneralCapabilities));\r
     DEBUG ((DEBUG_INFO, "  HPET_GENERAL_CONFIGURATION    = 0x%016lx\n", mHpetGeneralConfiguration.Uint64));\r
@@ -812,7 +812,7 @@ TimerDriverInitialize (
       DEBUG ((DEBUG_INFO, "  HPET_TIMER%d_COMPARATOR        = 0x%016lx\n", TimerIndex, HpetRead (HPET_TIMER_COMPARATOR_OFFSET    + TimerIndex * HPET_TIMER_STRIDE)));\r
       DEBUG ((DEBUG_INFO, "  HPET_TIMER%d_MSI_ROUTE         = 0x%016lx\n", TimerIndex, HpetRead (HPET_TIMER_MSI_ROUTE_OFFSET     + TimerIndex * HPET_TIMER_STRIDE)));\r
     }\r
-  );\r
+  DEBUG_CODE_END ();\r
 \r
   //\r
   // Capture the current HPET main counter value.\r
@@ -958,7 +958,7 @@ TimerDriverInitialize (
   //\r
   // Show state of enabled HPET timer\r
   //\r
-  DEBUG_CODE (\r
+  DEBUG_CODE_BEGIN ();\r
     if (mTimerConfiguration.Bits.MsiInterruptCapability != 0 && FeaturePcdGet (PcdHpetMsiEnable)) {\r
       DEBUG ((DEBUG_INFO, "HPET Interrupt Mode MSI\n"));\r
     } else {\r
@@ -977,7 +977,7 @@ TimerDriverInitialize (
     // Wait for a few timer interrupts to fire before continuing\r
     //\r
     while (mNumTicks < 10);\r
-  );\r
+  DEBUG_CODE_END ();\r
 \r
   //\r
   // Install the Timer Architectural Protocol onto a new handle\r