From: "Wu, Hao A" <hao.a.wu@intel.com>
To: Rebecca Cran <rebecca@bsdio.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Wang, Jian J" <jian.j.wang@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
"Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Improve formatting of warning DEBUG in UsbSelectConfig
Date: Thu, 23 Feb 2023 01:39:05 +0000 [thread overview]
Message-ID: <DM6PR11MB4025E553118C92648DBAAD8ACAAB9@DM6PR11MB4025.namprd11.prod.outlook.com> (raw)
In-Reply-To: <2488f931-b915-9282-65b3-5eb8d74c683d@bsdio.com>
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 <rebecca@bsdio.com>
> Sent: Wednesday, February 22, 2023 7:43 PM
> To: devel@edk2.groups.io; Wu, Hao A <hao.a.wu@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray
> <ray.ni@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.wang@intel.com>; Gao,
> >> Liming <gaoliming@byosoft.com.cn>; Wu, Hao A <hao.a.wu@intel.com>;
> >> Ni, Ray <ray.ni@intel.com>
> >> Cc: Rebecca Cran <rebecca@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 <rebecca@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
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
next prev parent reply other threads:[~2023-02-23 1:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 0:51 [PATCH 1/1] MdeModulePkg: Improve formatting of warning DEBUG in UsbSelectConfig Rebecca Cran
2023-02-22 7:19 ` [edk2-devel] " Wu, Hao A
2023-02-22 11:43 ` Rebecca Cran
2023-02-23 1:39 ` Wu, Hao A [this message]
2023-02-23 23:08 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR11MB4025E553118C92648DBAAD8ACAAB9@DM6PR11MB4025.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox