summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2022-08-02 13:28:21 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-09 01:42:39 +0000
commit1096a9b04bbf7bf2319210060bfc1afaac943235 (patch)
treee4449d626a0ddf494f1de6ebfb6569f6561f0644 /MdeModulePkg/Bus
parentb4036b52b18b215973a1d388c37b5affd55679cc (diff)
downloadedk2-1096a9b04bbf7bf2319210060bfc1afaac943235.tar.gz
edk2-1096a9b04bbf7bf2319210060bfc1afaac943235.tar.bz2
edk2-1096a9b04bbf7bf2319210060bfc1afaac943235.zip
MdeModulePkg: Fix imbalanced debug macros
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>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c2
-rw-r--r--MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
index 0d02c2785d..3e6f75345d 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/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
index 53b63ab52b..dd45167a00 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->DriverTypeD ? "TRUE" : "FALSE"));
DEBUG ((DEBUG_INFO, " Driver Type 4 %a\n", Capability->DriverType4 ? "TRUE" : "FALSE"));
if (Capability->TimerCount == 0) {
- DEBUG ((DEBUG_INFO, " Retuning TimerCnt Disabled\n", 2 * (Capability->TimerCount - 1)));
+ DEBUG ((DEBUG_INFO, " Retuning TimerCnt Disabled\n"));
} else {
DEBUG ((DEBUG_INFO, " Retuning TimerCnt %dseconds\n", 2 * (Capability->TimerCount - 1)));
}
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 5495b324b3..aed34596f4 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 system hardware
// to perform recovery.
//
- DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current\n", Port));
+ DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: Critical Over Current (port %d)\n", Port));
return EFI_DEVICE_ERROR;
}
@@ -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 Current\n", Port));
+ DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current (port %d)\n", Port));
}
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 device, the port
// would be disabled, so it's also necessary to detach and enumerate again.
//
- DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current\n", Port));
+ DEBUG ((DEBUG_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current (port %d)\n", Port));
}
if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNECTION)) {
@@ -969,7 +969,7 @@ UsbEnumeratePort (
// Case4:
// Device connected or disconnected normally.
//
- DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally\n", Port));
+ DEBUG ((DEBUG_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally (port %d)\n", Port));
}
//