From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.20070.1661399354169722501 for ; Wed, 24 Aug 2022 20:49:14 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=CH4a0Xzz; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.195.228.134]) by linux.microsoft.com (Postfix) with ESMTPSA id C0A142125998; Wed, 24 Aug 2022 20:49:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C0A142125998 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1661399353; bh=W2QttFB/JkFkpRxx/BcHslE/NJAxIa6kzayZg/866tM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CH4a0XzzmM3cW/hwIoc4Q+iwv9tEfmVnYIZwKvqJsBgC7r5gH6Q+eTjZdbwRl195X A8/r5hD5rdXs3HqqXwDToaZjcGCfPBne7QR5Lv8/O7YfYIxWJwBT5cq56vxEAHZcAo z8SV6QiJ5AujvPH1BVEuIX+C1DFpwYQXJx8773XQ= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Dandan Bi , Guomin Jiang , Hao A Wu , Jian J Wang , Liming Gao , Ray Ni Subject: [PATCH v2 3/8] MdeModulePkg: Fix imbalanced debug macros Date: Wed, 24 Aug 2022 23:48:19 -0400 Message-Id: <20220825034824.4044-4-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220825034824.4044-1-mikuback@linux.microsoft.com> References: <20220825034824.4044-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki 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 Cc: Guomin Jiang Cc: Hao A Wu Cc: Jian J Wang Cc: Liming Gao Cc: Liming Gao Cc: Ray Ni Signed-off-by: Michael Kubacki Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c = | 2 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c = | 8 ++++---- MdeModulePkg/Core/Dxe/Image/Image.c = | 2 +- MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgr= essLibGraphics.c | 2 +- MdeModulePkg/Universal/CapsulePei/UefiCapsule.c = | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModule= Pkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index 53b63ab52b93..dd45167a009e 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c @@ -64,7 +64,7 @@ DumpCapabilityReg ( DEBUG ((DEBUG_INFO, " Driver Type D %a\n", Capability->DriverTyp= eD ? "TRUE" : "FALSE")); DEBUG ((DEBUG_INFO, " Driver Type 4 %a\n", Capability->DriverTyp= e4 ? "TRUE" : "FALSE")); if (Capability->TimerCount =3D=3D 0) { - DEBUG ((DEBUG_INFO, " Retuning TimerCnt Disabled\n", 2 * (Capabili= ty->TimerCount - 1))); + DEBUG ((DEBUG_INFO, " Retuning TimerCnt Disabled\n")); } else { DEBUG ((DEBUG_INFO, " Retuning TimerCnt %dseconds\n", 2 * (Capabil= ity->TimerCount - 1))); } diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bu= s/Usb/UsbBusDxe/UsbEnumer.c index 5495b324b381..aed34596f469 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c @@ -941,7 +941,7 @@ UsbEnumeratePort ( // which probably is caused by short circuit. It has to wait sys= tem hardware // to perform recovery. // - DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current\n", = Port)); + DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current (por= t %d)\n", Port)); return EFI_DEVICE_ERROR; } =20 @@ -951,7 +951,7 @@ UsbEnumeratePort ( // over current. As a result, all ports are nearly power-off, so // it's necessary to detach and enumerate all ports again. // - DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Cur= rent\n", Port)); + DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Cur= rent (port %d)\n", Port)); } =20 if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_ENABLE= )) { @@ -961,7 +961,7 @@ UsbEnumeratePort ( // on 2.0 roothub does. When over-current has influence on 1.1 dev= ice, the port // would be disabled, so it's also necessary to detach and enumera= te again. // - DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Cur= rent\n", Port)); + DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Cur= rent (port %d)\n", Port)); } =20 if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNEC= TION)) { @@ -969,7 +969,7 @@ UsbEnumeratePort ( // Case4: // Device connected or disconnected normally. // - DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Nor= mally\n", Port)); + DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Nor= mally (port %d)\n", Port)); } =20 // diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/= Image/Image.c index 68bde5c15c52..06cc6744b8c6 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1741,7 +1741,7 @@ CoreStartImage ( if ((Image->ExitDataSize !=3D 0) || (Image->ExitData !=3D NULL)) { DEBUG ((DEBUG_LOAD, "StartImage: ExitDataSize %d, ExitData %p", (UIN= T32)Image->ExitDataSize, Image->ExitData)); if (Image->ExitData !=3D NULL) { - DEBUG ((DEBUG_LOAD, " (%hs)", Image->ExitData)); + DEBUG ((DEBUG_LOAD, " (%s)", Image->ExitData)); } =20 DEBUG ((DEBUG_LOAD, "\n")); diff --git a/MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/Displa= yUpdateProgressLibGraphics.c b/MdeModulePkg/Library/DisplayUpdateProgress= LibGraphics/DisplayUpdateProgressLibGraphics.c index 83053464e06e..6b012fed35db 100644 --- a/MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdate= ProgressLibGraphics.c +++ b/MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdate= ProgressLibGraphics.c @@ -148,7 +148,7 @@ FindDim ( (VOID **)&BootLogo ); if ((BootLogo =3D=3D NULL) || (EFI_ERROR (Status))) { - DEBUG ((DEBUG_ERROR, "Failed to locate gEdkiiBootLogo2ProtocolGuid. = No Progress bar support. \n", Status)); + DEBUG ((DEBUG_ERROR, "Failed to locate gEdkiiBootLogo2ProtocolGuid S= tatus =3D %r. No Progress bar support. \n", Status)); return; } =20 diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModuleP= kg/Universal/CapsulePei/UefiCapsule.c index ef60d4e1b7b7..cdeffa911311 100644 --- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c +++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c @@ -976,7 +976,7 @@ GetScatterGatherHeadEntries ( =20 if (EFI_ERROR (Status)) { if (Status !=3D EFI_NOT_FOUND) { - DEBUG ((DEBUG_ERROR, "Unexpected error getting Capsule Update va= riable. Status =3D %r\n")); + DEBUG ((DEBUG_ERROR, "Unexpected error getting Capsule Update va= riable. Status =3D %r\n", Status)); } =20 break; --=20 2.28.0.windows.1