mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
OvmfPkg: 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: Andrew Fish <afish@apple.com>
This commit is contained in:
parent
ed7f7c9168
commit
8e875037bf
@ -228,7 +228,7 @@ InternalLegacyBiosFarCall (
|
|||||||
// interupts other than the Timer interrupt that was disabled above can not be
|
// interupts other than the Timer interrupt that was disabled above can not be
|
||||||
// handled properly from real mode.
|
// handled properly from real mode.
|
||||||
//
|
//
|
||||||
DEBUG_CODE (
|
DEBUG_CODE_BEGIN ();
|
||||||
UINTN Vector;
|
UINTN Vector;
|
||||||
UINTN Count;
|
UINTN Count;
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ InternalLegacyBiosFarCall (
|
|||||||
DEBUG ((DEBUG_ERROR, "ERROR: More than one HW interrupt active with CSM enabled\n"));
|
DEBUG ((DEBUG_ERROR, "ERROR: More than one HW interrupt active with CSM enabled\n"));
|
||||||
}
|
}
|
||||||
ASSERT (Count < 2);
|
ASSERT (Count < 2);
|
||||||
);
|
DEBUG_CODE_END ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the Timer AP has enabled the 8254 timer IRQ and the current 8254 timer
|
// If the Timer AP has enabled the 8254 timer IRQ and the current 8254 timer
|
||||||
@ -310,7 +310,7 @@ InternalLegacyBiosFarCall (
|
|||||||
// EBDA base address, if the current EBDA base address is smaller, it indicates
|
// EBDA base address, if the current EBDA base address is smaller, it indicates
|
||||||
// PcdEbdaReservedMemorySize should be adjusted to larger for more OPROMs.
|
// PcdEbdaReservedMemorySize should be adjusted to larger for more OPROMs.
|
||||||
//
|
//
|
||||||
DEBUG_CODE (
|
DEBUG_CODE_BEGIN ();
|
||||||
{
|
{
|
||||||
UINTN EbdaBaseAddress;
|
UINTN EbdaBaseAddress;
|
||||||
UINTN ReservedEbdaBaseAddress;
|
UINTN ReservedEbdaBaseAddress;
|
||||||
@ -322,7 +322,7 @@ InternalLegacyBiosFarCall (
|
|||||||
ASSERT (ReservedEbdaBaseAddress <= EbdaBaseAddress);
|
ASSERT (ReservedEbdaBaseAddress <= EbdaBaseAddress);
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
DEBUG_CODE_END ();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Restore interrupt of debug timer
|
// Restore interrupt of debug timer
|
||||||
|
@ -250,7 +250,7 @@ RemoveStaleFvFileOptions (
|
|||||||
//
|
//
|
||||||
Status = EfiBootManagerDeleteLoadOptionVariable (
|
Status = EfiBootManagerDeleteLoadOptionVariable (
|
||||||
BootOptions[Index].OptionNumber, LoadOptionTypeBoot);
|
BootOptions[Index].OptionNumber, LoadOptionTypeBoot);
|
||||||
DEBUG_CODE (
|
DEBUG_CODE_BEGIN ();
|
||||||
CHAR16 *DevicePathString;
|
CHAR16 *DevicePathString;
|
||||||
|
|
||||||
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,
|
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,
|
||||||
@ -266,7 +266,7 @@ RemoveStaleFvFileOptions (
|
|||||||
if (DevicePathString != NULL) {
|
if (DevicePathString != NULL) {
|
||||||
FreePool (DevicePathString);
|
FreePool (DevicePathString);
|
||||||
}
|
}
|
||||||
);
|
DEBUG_CODE_END ();
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
|
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
|
||||||
|
@ -247,7 +247,7 @@ RemoveStaleFvFileOptions (
|
|||||||
//
|
//
|
||||||
Status = EfiBootManagerDeleteLoadOptionVariable (
|
Status = EfiBootManagerDeleteLoadOptionVariable (
|
||||||
BootOptions[Index].OptionNumber, LoadOptionTypeBoot);
|
BootOptions[Index].OptionNumber, LoadOptionTypeBoot);
|
||||||
DEBUG_CODE (
|
DEBUG_CODE_BEGIN ();
|
||||||
CHAR16 *DevicePathString;
|
CHAR16 *DevicePathString;
|
||||||
|
|
||||||
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,
|
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,
|
||||||
@ -263,7 +263,7 @@ RemoveStaleFvFileOptions (
|
|||||||
if (DevicePathString != NULL) {
|
if (DevicePathString != NULL) {
|
||||||
FreePool (DevicePathString);
|
FreePool (DevicePathString);
|
||||||
}
|
}
|
||||||
);
|
DEBUG_CODE_END ();
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
|
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
|
||||||
|
@ -251,7 +251,7 @@ RemoveStaleFvFileOptions (
|
|||||||
//
|
//
|
||||||
Status = EfiBootManagerDeleteLoadOptionVariable (
|
Status = EfiBootManagerDeleteLoadOptionVariable (
|
||||||
BootOptions[Index].OptionNumber, LoadOptionTypeBoot);
|
BootOptions[Index].OptionNumber, LoadOptionTypeBoot);
|
||||||
DEBUG_CODE (
|
DEBUG_CODE_BEGIN ();
|
||||||
CHAR16 *DevicePathString;
|
CHAR16 *DevicePathString;
|
||||||
|
|
||||||
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,
|
DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,
|
||||||
@ -267,7 +267,7 @@ RemoveStaleFvFileOptions (
|
|||||||
if (DevicePathString != NULL) {
|
if (DevicePathString != NULL) {
|
||||||
FreePool (DevicePathString);
|
FreePool (DevicePathString);
|
||||||
}
|
}
|
||||||
);
|
DEBUG_CODE_END ();
|
||||||
}
|
}
|
||||||
|
|
||||||
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
|
EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
|
||||||
|
@ -564,7 +564,7 @@ GetResourcePadding (
|
|||||||
|
|
||||||
Address = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS *)&HpcPciAddress;
|
Address = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS *)&HpcPciAddress;
|
||||||
|
|
||||||
DEBUG_CODE (
|
DEBUG_CODE_BEGIN ();
|
||||||
CHAR16 *DevicePathString;
|
CHAR16 *DevicePathString;
|
||||||
|
|
||||||
DevicePathString = ConvertDevicePathToText (HpcDevicePath, FALSE, FALSE);
|
DevicePathString = ConvertDevicePathToText (HpcDevicePath, FALSE, FALSE);
|
||||||
@ -576,7 +576,7 @@ GetResourcePadding (
|
|||||||
if (DevicePathString != NULL) {
|
if (DevicePathString != NULL) {
|
||||||
FreePool (DevicePathString);
|
FreePool (DevicePathString);
|
||||||
}
|
}
|
||||||
);
|
DEBUG_CODE_END ();
|
||||||
|
|
||||||
if (HpcState == NULL || Padding == NULL || Attributes == NULL) {
|
if (HpcState == NULL || Padding == NULL || Attributes == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user