]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Improve formatting of DEBUG messages in UsbBusDxe
authorRebecca Cran <rebecca@bsdio.com>
Fri, 24 Feb 2023 00:18:01 +0000 (08:18 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 7 Mar 2023 07:09:20 +0000 (07:09 +0000)
Improve the formatting of DEBUG messages in UsbBusDxe by adding
a hyphen to separate the EFI_STATUS code.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c

index 6a3ac63c3aa05d640ec3b80b8ead32139e28e8fe..c25f3cc2f2791f483069e3fee5e00b8486616c0e 100644 (file)
@@ -838,7 +838,7 @@ UsbIoPortReset (
   if (EFI_ERROR (Status)) {\r
     DEBUG ((\r
       DEBUG_ERROR,\r
-      "UsbIoPortReset: failed to reset hub port %d@hub  %d, %r \n",\r
+      "UsbIoPortReset: failed to reset hub port %d@hub  %d - %r\n",\r
       Dev->ParentPort,\r
       Dev->ParentAddr,\r
       Status\r
@@ -945,7 +945,7 @@ UsbBusBuildProtocol (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open device path %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open device path %r\n", Status));\r
 \r
     FreePool (UsbBus);\r
     return Status;\r
@@ -978,7 +978,7 @@ UsbBusBuildProtocol (
                    );\r
 \r
   if (EFI_ERROR (Status) && EFI_ERROR (Status2)) {\r
-    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open USB_HC/USB2_HC %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open USB_HC/USB2_HC %r\n", Status));\r
 \r
     Status = EFI_DEVICE_ERROR;\r
     goto CLOSE_HC;\r
@@ -1006,7 +1006,7 @@ UsbBusBuildProtocol (
                   );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to install bus protocol %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to install bus protocol %r\n", Status));\r
     goto CLOSE_HC;\r
   }\r
 \r
@@ -1054,7 +1054,7 @@ UsbBusBuildProtocol (
   Status = mUsbRootHubApi.Init (RootIf);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to init root hub %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to init root hub %r\n", Status));\r
     goto FREE_ROOTHUB;\r
   }\r
 \r
@@ -1102,7 +1102,7 @@ CLOSE_HC:
          );\r
   FreePool (UsbBus);\r
 \r
-  DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to start bus driver %r\n", Status));\r
+  DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to start bus driver %r\n", Status));\r
   return Status;\r
 }\r
 \r
index a620a670748cbe34edeec5fe99c36aad75950995..8b078e7e493655969f3c5221c2fbdbf04d11efde 100644 (file)
@@ -761,7 +761,7 @@ UsbGetOneConfig (
   if (EFI_ERROR (Status)) {\r
     DEBUG ((\r
       DEBUG_ERROR,\r
-      "UsbGetOneConfig: failed to get descript length(%d) %r\n",\r
+      "UsbGetOneConfig: failed to get descript length(%d) %r\n",\r
       Desc.TotalLength,\r
       Status\r
       ));\r
@@ -787,7 +787,7 @@ UsbGetOneConfig (
   Status = UsbCtrlGetDesc (UsbDev, USB_DESC_TYPE_CONFIG, Index, 0, Buf, Desc.TotalLength);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "UsbGetOneConfig: failed to get full descript %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "UsbGetOneConfig: failed to get full descript %r\n", Status));\r
 \r
     FreePool (Buf);\r
     return NULL;\r
@@ -891,7 +891,7 @@ UsbBuildDescTable (
   Status = UsbBuildLangTable (UsbDev);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_INFO, "UsbBuildDescTable: get language ID table %r\n", Status));\r
+    DEBUG ((DEBUG_INFO, "UsbBuildDescTable: get language ID table %r\n", Status));\r
   }\r
 \r
   return EFI_SUCCESS;\r
index aed34596f469da4a156d35a688ce1069b30fedee..b3a40639f28052b4d076ec72dfef84967d906e14 100644 (file)
@@ -440,7 +440,7 @@ UsbSelectConfig (
     if (EFI_ERROR (Status)) {\r
       DEBUG ((\r
         DEBUG_WARN,\r
-        "UsbSelectConfig: failed to connect driver %r, ignored\n",\r
+        "UsbSelectConfig: failed to connect driver %r, ignored\n",\r
         Status\r
         ));\r
     }\r
index 0497a73f443c9fb59f22dd6bf0ad7d1a0279116b..1a473d099892d2dd3723b7556615f8e263383813 100644 (file)
@@ -609,7 +609,7 @@ UsbHubInit (
   Status  = UsbHubReadDesc (HubDev, HubDesc);\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "UsbHubInit: failed to read HUB descriptor %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "UsbHubInit: failed to read HUB descriptor %r\n", Status));\r
     return Status;\r
   }\r
 \r