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.web11.4616.1662157369034093355 for ; Fri, 02 Sep 2022 15:22:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=C1u0MaUI; 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 C886C20B9D3C; Fri, 2 Sep 2022 15:22:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C886C20B9D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1662157368; bh=X1yDckkxCDHNhcwQsAqu2lwYMQeSNIc/bm5IBs7Cx9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C1u0MaUIGPYjJbM0LeZS1W8Eg2Op9NEQYNj4EQYdpXDdqa6FzooIwWcSXGOYMeARA Pa5Rdm9kO/fBiVx9+VCt3qDwp1lNM/O1hL3pG93Xy7eXglyFxLlZDT6rI4kJj7GQHE UdELO02ewxFKAKrnlABdaq+8M8u+NTipRmlob4rg= 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 v3 3/8] MdeModulePkg: Fix imbalanced debug macros Date: Fri, 2 Sep 2022 18:22:01 -0400 Message-Id: <20220902222206.1509-4-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220902222206.1509-1-mikuback@linux.microsoft.com> References: <20220902222206.1509-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 Reviewed-by: Liming Gao --- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c = | 2 +- 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 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c b/MdeModu= lePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c index 0d02c2785da7..3e6f75345d98 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c @@ -264,7 +264,7 @@ NvmeInitPrivateData ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "%a: The device path is invalid for Controller %d.\n", + "%a: The device path is invalid.\n", __FUNCTION__ )); return Status; 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