]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
authorMichael D Kinney <michael.d.kinney@intel.com>
Sun, 5 Dec 2021 22:33:55 +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: Andrew Fish <afish@apple.com>
OvmfPkg/Csm/LegacyBiosDxe/Thunk.c
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c
OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c

index d9828bb2f894a23c979533e3f2be40dfd71011a9..dd706fbd6e237fef18ca35cbf80dce6015ad10eb 100644 (file)
@@ -228,7 +228,7 @@ InternalLegacyBiosFarCall (
   // interupts other than the Timer interrupt that was disabled above can not be\r
   // handled properly from real mode.\r
   //\r
-  DEBUG_CODE (\r
+  DEBUG_CODE_BEGIN ();\r
     UINTN  Vector;\r
     UINTN  Count;\r
 \r
@@ -245,7 +245,7 @@ InternalLegacyBiosFarCall (
       DEBUG ((DEBUG_ERROR, "ERROR: More than one HW interrupt active with CSM enabled\n"));\r
     }\r
     ASSERT (Count < 2);\r
-  );\r
+  DEBUG_CODE_END ();\r
 \r
   //\r
   // If the Timer AP has enabled the 8254 timer IRQ and the current 8254 timer\r
@@ -310,7 +310,7 @@ InternalLegacyBiosFarCall (
   // EBDA base address, if the current EBDA base address is smaller, it indicates\r
   // PcdEbdaReservedMemorySize should be adjusted to larger for more OPROMs.\r
   //\r
-  DEBUG_CODE (\r
+  DEBUG_CODE_BEGIN ();\r
     {\r
       UINTN                 EbdaBaseAddress;\r
       UINTN                 ReservedEbdaBaseAddress;\r
@@ -322,7 +322,7 @@ InternalLegacyBiosFarCall (
         ASSERT (ReservedEbdaBaseAddress <= EbdaBaseAddress);\r
       );\r
     }\r
-  );\r
+  DEBUG_CODE_END ();\r
 \r
   //\r
   // Restore interrupt of debug timer\r
index 186401296ae2382bb5d82c2824ec9c69cd191bb2..1408d94f7dae74fcef6b74f34e8f4f414026baee 100644 (file)
@@ -250,7 +250,7 @@ RemoveStaleFvFileOptions (
     //\r
     Status = EfiBootManagerDeleteLoadOptionVariable (\r
                BootOptions[Index].OptionNumber, LoadOptionTypeBoot);\r
-    DEBUG_CODE (\r
+    DEBUG_CODE_BEGIN ();\r
       CHAR16 *DevicePathString;\r
 \r
       DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,\r
@@ -266,7 +266,7 @@ RemoveStaleFvFileOptions (
       if (DevicePathString != NULL) {\r
         FreePool (DevicePathString);\r
       }\r
-      );\r
+    DEBUG_CODE_END ();\r
   }\r
 \r
   EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);\r
index 639dbd6e454fbce8dc59ba2da411c06f3ce500e5..32b70a46d007620a2a2c1d91b89dbbbdb7c76ee5 100644 (file)
@@ -247,7 +247,7 @@ RemoveStaleFvFileOptions (
     //\r
     Status = EfiBootManagerDeleteLoadOptionVariable (\r
                BootOptions[Index].OptionNumber, LoadOptionTypeBoot);\r
-    DEBUG_CODE (\r
+    DEBUG_CODE_BEGIN ();\r
       CHAR16 *DevicePathString;\r
 \r
       DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,\r
@@ -263,7 +263,7 @@ RemoveStaleFvFileOptions (
       if (DevicePathString != NULL) {\r
         FreePool (DevicePathString);\r
       }\r
-      );\r
+    DEBUG_CODE_END ();\r
   }\r
 \r
   EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);\r
index fd8057735549e139db0d9e3eea27bb49b597ba4d..e238af21f13a749eddd153c32bfc2c48f586c92e 100644 (file)
@@ -251,7 +251,7 @@ RemoveStaleFvFileOptions (
     //\r
     Status = EfiBootManagerDeleteLoadOptionVariable (\r
                BootOptions[Index].OptionNumber, LoadOptionTypeBoot);\r
-    DEBUG_CODE (\r
+    DEBUG_CODE_BEGIN ();\r
       CHAR16 *DevicePathString;\r
 \r
       DevicePathString = ConvertDevicePathToText(BootOptions[Index].FilePath,\r
@@ -267,7 +267,7 @@ RemoveStaleFvFileOptions (
       if (DevicePathString != NULL) {\r
         FreePool (DevicePathString);\r
       }\r
-      );\r
+    DEBUG_CODE_END ();\r
   }\r
 \r
   EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);\r
index 62e42d6771f9c96e5829787afb277912b1b99040..387b1e80eb01ecb959f9482a396eae3a6a76e27f 100644 (file)
@@ -564,7 +564,7 @@ GetResourcePadding (
 \r
   Address = (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS *)&HpcPciAddress;\r
 \r
-  DEBUG_CODE (\r
+  DEBUG_CODE_BEGIN ();\r
     CHAR16                                      *DevicePathString;\r
 \r
     DevicePathString = ConvertDevicePathToText (HpcDevicePath, FALSE, FALSE);\r
@@ -576,7 +576,7 @@ GetResourcePadding (
     if (DevicePathString != NULL) {\r
       FreePool (DevicePathString);\r
     }\r
-    );\r
+  DEBUG_CODE_END ();\r
 \r
   if (HpcState == NULL || Padding == NULL || Attributes == NULL) {\r
     return EFI_INVALID_PARAMETER;\r