If you think the format modification is valuable, please at least keep it aligned within the driver level.
A search of the keyword '%r' in UsbBusDxe shows: edk2\MdeModulePkg\Bus\Usb\UsbBusDxe\UsbBus.c (8 hits) Line 841: "UsbIoPortReset: failed to reset hub port %d@hub %d, %r \n", Line 870: "UsbIoPortReset: failed to set address for device %d - %r\n", Line 890: "UsbIoPortReset: failed to set configure for device %d - %r\n", Line 948: DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open device path %r\n", Status)); Line 981: DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to open USB_HC/USB2_HC %r\n", Status)); Line 1009: DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to install bus protocol %r\n", Status)); Line 1057: DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to init root hub %r\n", Status)); Line 1105: DEBUG ((DEBUG_ERROR, "UsbBusStart: Failed to start bus driver %r\n", Status)); edk2\MdeModulePkg\Bus\Usb\UsbBusDxe\UsbDesc.c (4 hits) Line 764: "UsbGetOneConfig: failed to get descript length(%d) %r\n", Line 790: DEBUG ((DEBUG_ERROR, "UsbGetOneConfig: failed to get full descript %r\n", Status)); Line 829: DEBUG ((DEBUG_ERROR, "UsbBuildDescTable: failed to get device descriptor - %r\n", Status)); Line 894: DEBUG ((DEBUG_INFO, "UsbBuildDescTable: get language ID table %r\n", Status)); edk2\MdeModulePkg\Bus\Usb\UsbBusDxe\UsbEnumer.c (9 hits) Line 153: DEBUG ((DEBUG_ERROR, "UsbCreateInterface: failed to install UsbIo - %r\n", Status)); Line 172: DEBUG ((DEBUG_ERROR, "UsbCreateInterface: failed to open host for child - %r\n", Status)); Line 443: "UsbSelectConfig: failed to connect driver (%r), ignored\n", Line 693: DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to reset port %d - %r\n", Port, Status)); Line 794: DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to set device address - %r\n", Status)); Line 809: DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to get max packet for EP 0 - %r\n", Status)); Line 822: DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to build descriptor table - %r\n", Status)); Line 834: DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to set configure %d - %r\n", Config, Status)); Line 846: DEBUG ((DEBUG_ERROR, "UsbEnumerateNewDev: failed to create interfaces - %r\n", Status)); edk2\MdeModulePkg\Bus\Usb\UsbBusDxe\UsbHub.c (5 hits) Line 510: DEBUG ((DEBUG_ERROR, "UsbOnHubInterrupt: failed to remove async transfer - %r\n", Status)); Line 525: DEBUG ((DEBUG_ERROR, "UsbOnHubInterrupt: failed to submit new async transfer - %r\n", Status)); Line 612: DEBUG ((DEBUG_ERROR, "UsbHubInit: failed to read HUB descriptor %r\n", Status)); Line 671: "UsbHubInit: failed to create signal for hub %d - %r\n", Line 700: "UsbHubInit: failed to queue interrupt transfer for hub %d - %r\n", I found that most of them follows the pattern "... - %r ...". Not sure if this format is good enough to you. Best Regards, Hao Wu > -----Original Message----- > From: Rebecca Cran <rebe...@bsdio.com> > Sent: Wednesday, February 22, 2023 7:43 PM > To: devel@edk2.groups.io; Wu, Hao A <hao.a...@intel.com>; Wang, Jian J > <jian.j.w...@intel.com>; Gao, Liming <gaolim...@byosoft.com.cn>; Ni, Ray > <ray...@intel.com> > Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Improve formatting of > warning DEBUG in UsbSelectConfig > > That's the only USB debug message I noticed that seemed unclear. > > Looking through the code I see a few others that could also be improved: > > > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c > 764: "UsbGetOneConfig: failed to get descript length(%d) %r\n", > 790: DEBUG ((DEBUG_ERROR, "UsbGetOneConfig: failed to get full > descript %r\n", Status)); > 894: DEBUG ((DEBUG_INFO, "UsbBuildDescTable: get language ID table %r\n", > Status)); > > > -- > > Rebecca Cran > > > On 2/22/23 12:19 AM, Wu, Hao A wrote: > > Sorry, may I know why only this specific debug message requests format > improving while others do not? > > > > Best Regards, > > Hao Wu > > > >> -----Original Message----- > >> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > >> Rebecca Cran > >> Sent: Tuesday, February 21, 2023 8:52 AM > >> To: devel@edk2.groups.io; Wang, Jian J <jian.j.w...@intel.com>; Gao, > >> Liming <gaolim...@byosoft.com.cn>; Wu, Hao A <hao.a...@intel.com>; > >> Ni, Ray <ray...@intel.com> > >> Cc: Rebecca Cran <rebe...@quicinc.com> > >> Subject: [edk2-devel] [PATCH 1/1] MdeModulePkg: Improve formatting of > >> warning DEBUG in UsbSelectConfig > >> > >> Improve the formatting of a warning in UsbSelectConfig by adding > >> parentheses around the EFI_STATUS value. > >> > >> Signed-off-by: Rebecca Cran <rebe...@quicinc.com> > >> --- > >> MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c > >> b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c > >> index aed34596f469..29a6419c3c86 100644 > >> --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c > >> +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c > >> @@ -440,7 +440,7 @@ UsbSelectConfig ( > >> if (EFI_ERROR (Status)) { > >> DEBUG (( > >> DEBUG_WARN, > >> - "UsbSelectConfig: failed to connect driver %r, ignored\n", > >> + "UsbSelectConfig: failed to connect driver (%r), ignored\n", > >> Status > >> )); > >> } > >> -- > >> 2.30.2 > >> > >> > >> > >> > >> > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100450): https://edk2.groups.io/g/devel/message/100450 Mute This Topic: https://groups.io/mt/97099772/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-