]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Fix imbalanced debug macros
authorMichael Kubacki <michael.kubacki@microsoft.com>
Tue, 2 Aug 2022 17:28:21 +0000 (13:28 -0400)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 9 Sep 2022 01:42:39 +0000 (01:42 +0000)
Updates debug macros in the package that have an imbalanced number
of print specifiers to arguments. These changes try to preserve
what was likely intended by the author. In cases information was
missing due to the bug, the specifier may be removed since it was
not previously accurately printing the expected value.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
MdeModulePkg/Core/Dxe/Image/Image.c
MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.c
MdeModulePkg/Universal/CapsulePei/UefiCapsule.c

index 0d02c2785da795acf77e926e513016a30ece66fa..3e6f75345d98b244816483143be208f3166435f2 100644 (file)
@@ -264,7 +264,7 @@ NvmeInitPrivateData (
   if (EFI_ERROR (Status)) {\r
     DEBUG ((\r
       DEBUG_ERROR,\r
-      "%a: The device path is invalid for Controller %d.\n",\r
+      "%a: The device path is invalid.\n",\r
       __FUNCTION__\r
       ));\r
     return Status;\r
index 53b63ab52b93e584142c90e37b8b3d0cdac42c4c..dd45167a009ee8d686aa03a3bdce6a2f02dcc0a0 100644 (file)
@@ -64,7 +64,7 @@ DumpCapabilityReg (
   DEBUG ((DEBUG_INFO, "   Driver Type D     %a\n", Capability->DriverTypeD ? "TRUE" : "FALSE"));\r
   DEBUG ((DEBUG_INFO, "   Driver Type 4     %a\n", Capability->DriverType4 ? "TRUE" : "FALSE"));\r
   if (Capability->TimerCount == 0) {\r
-    DEBUG ((DEBUG_INFO, "   Retuning TimerCnt Disabled\n", 2 * (Capability->TimerCount - 1)));\r
+    DEBUG ((DEBUG_INFO, "   Retuning TimerCnt Disabled\n"));\r
   } else {\r
     DEBUG ((DEBUG_INFO, "   Retuning TimerCnt %dseconds\n", 2 * (Capability->TimerCount - 1)));\r
   }\r
index 5495b324b381b9c36748faa4f689b307c26669a5..aed34596f469da4a156d35a688ce1069b30fedee 100644 (file)
@@ -941,7 +941,7 @@ UsbEnumeratePort (
       //   which probably is caused by short circuit. It has to wait system hardware\r
       //   to perform recovery.\r
       //\r
-      DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current\n", Port));\r
+      DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current (port %d)\n", Port));\r
       return EFI_DEVICE_ERROR;\r
     }\r
 \r
@@ -951,7 +951,7 @@ UsbEnumeratePort (
     //   over current. As a result, all ports are nearly power-off, so\r
     //   it's necessary to detach and enumerate all ports again.\r
     //\r
-    DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current\n", Port));\r
+    DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current (port %d)\n", Port));\r
   }\r
 \r
   if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_ENABLE)) {\r
@@ -961,7 +961,7 @@ UsbEnumeratePort (
     //   on 2.0 roothub does. When over-current has influence on 1.1 device, the port\r
     //   would be disabled, so it's also necessary to detach and enumerate again.\r
     //\r
-    DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current\n", Port));\r
+    DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current (port %d)\n", Port));\r
   }\r
 \r
   if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNECTION)) {\r
@@ -969,7 +969,7 @@ UsbEnumeratePort (
     // Case4:\r
     //   Device connected or disconnected normally.\r
     //\r
-    DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally\n", Port));\r
+    DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally (port %d)\n", Port));\r
   }\r
 \r
   //\r
index 68bde5c15c52fcd68107aec248ebcd3e6c449586..06cc6744b8c6e4176cfa142bdbc6d55144a34d94 100644 (file)
@@ -1741,7 +1741,7 @@ CoreStartImage (
   if ((Image->ExitDataSize != 0) || (Image->ExitData != NULL)) {\r
     DEBUG ((DEBUG_LOAD, "StartImage: ExitDataSize %d, ExitData %p", (UINT32)Image->ExitDataSize, Image->ExitData));\r
     if (Image->ExitData != NULL) {\r
-      DEBUG ((DEBUG_LOAD, " (%hs)", Image->ExitData));\r
+      DEBUG ((DEBUG_LOAD, " (%s)", Image->ExitData));\r
     }\r
 \r
     DEBUG ((DEBUG_LOAD, "\n"));\r
index 83053464e06eb7531708c2b81b79f3c38e4a9fe8..6b012fed35db3a4fb3d2bc4c37d5e9a5b9e64663 100644 (file)
@@ -148,7 +148,7 @@ FindDim (
                   (VOID **)&BootLogo\r
                   );\r
   if ((BootLogo == NULL) || (EFI_ERROR (Status))) {\r
-    DEBUG ((DEBUG_ERROR, "Failed to locate gEdkiiBootLogo2ProtocolGuid.  No Progress bar support. \n", Status));\r
+    DEBUG ((DEBUG_ERROR, "Failed to locate gEdkiiBootLogo2ProtocolGuid Status = %r.  No Progress bar support. \n", Status));\r
     return;\r
   }\r
 \r
index ef60d4e1b7b7952bc16c447c3fd0947c318cec09..cdeffa9113119a8327d26abaa3ab1b7413c43cc3 100644 (file)
@@ -976,7 +976,7 @@ GetScatterGatherHeadEntries (
 \r
     if (EFI_ERROR (Status)) {\r
       if (Status != EFI_NOT_FOUND) {\r
-        DEBUG ((DEBUG_ERROR, "Unexpected error getting Capsule Update variable.  Status = %r\n"));\r
+        DEBUG ((DEBUG_ERROR, "Unexpected error getting Capsule Update variable.  Status = %r\n", Status));\r
       }\r
 \r
       break;\r