UefiCpuPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()

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>
This commit is contained in:
Michael D Kinney
2021-12-05 14:34:05 -08:00
committed by mergify[bot]
parent f9f4fb2329
commit 7c2a6033c1
6 changed files with 14 additions and 16 deletions

View File

@@ -2186,7 +2186,7 @@ MtrrSetMemoryAttributesInMtrrSettings (
//
// 0. Dump the requests.
//
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_CACHE, "Mtrr: Set Mem Attribute to %a, ScratchSize = %x%a",
(MtrrSetting == NULL) ? "Hardware" : "Buffer", *ScratchSize,
(RangeCount <= 1) ? "," : "\n"
@@ -2197,7 +2197,7 @@ MtrrSetMemoryAttributesInMtrrSettings (
Ranges[Index].BaseAddress, Ranges[Index].BaseAddress + Ranges[Index].Length
));
}
);
DEBUG_CODE_END ();
//
// 1. Validate the parameters.
@@ -2715,7 +2715,7 @@ MtrrDebugPrintAllMtrrsWorker (
IN MTRR_SETTINGS *MtrrSetting
)
{
DEBUG_CODE (
DEBUG_CODE_BEGIN ();
MTRR_SETTINGS LocalMtrrs;
MTRR_SETTINGS *Mtrrs;
UINTN Index;
@@ -2799,7 +2799,7 @@ MtrrDebugPrintAllMtrrsWorker (
Ranges[Index].BaseAddress, Ranges[Index].BaseAddress + Ranges[Index].Length - 1
));
}
);
DEBUG_CODE_END ();
}
/**