From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web10.4573.1677193703008838640 for ; Thu, 23 Feb 2023 15:08:23 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm2 header.b=I2v2kmw/; spf=pass (domain: bsdio.com, ip: 66.111.4.29, mailfrom: rebecca@bsdio.com) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 33BFB5C01C7; Thu, 23 Feb 2023 18:08:22 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 23 Feb 2023 18:08:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1677193702; x= 1677280102; bh=0IS4GYNqyqyzc7k5wPSjTscH0nm3nMPZXxvZ9f3h4qg=; b=I 2v2kmw/lQUTsNZAAKn5BmeaP+MNSAZMnaFpbJaKvmswgL48+tH9DWpn6PyNLQnTs X9CccUV9YTsYMk25TJ55tnJvAwLUNd6OvRhjCX7CouQXQaORb/5cZiiKdGhx23Ot FKvibu09suWH1KZ7JDFFUC39Su759GXv/QG3G6n4bI/wp0Hn7OQg0ggz2Q8nSC+z pfn//83aygWvSNPYwhiX3lPCFYvAkLfld+dFMRJgffIKiB4kV4+v7EVa921YF51P CMjlmLRaq/goPVLkB+2ucPYbDyAHB/RaqzRXVmdAOAOwqD1ZKit2Wtm3/4j8tfy6 I72PTUfNayQqhE3RfuLrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1677193702; x=1677280102; bh=0 IS4GYNqyqyzc7k5wPSjTscH0nm3nMPZXxvZ9f3h4qg=; b=JhnGgb5X5LoXyeaI0 nmE6NjotwwcZBD8LzZkaotnu82lvK7PoPx77nsC6rzKsl24HT+J6CAdlDFs5y4wD 81EiLgiiTSXm0XXLXxUMITurRdGOOiiL37OEzTX/YJRi91r0EeFly2Nv1UeacHgP jqcguBYGauoRhgvIh7HHqrnwpKg2UdW3HfXh9m1BPoORhUTCSFf2n9U3gY5KSk5y tt318c/fxDiZ10MrMZe/vihmUBdqDEOeAE3UVVRuaZoKqgLCZo+/SzRriX3h25xv x11Xb38Mef5ZOzd0tsaTtVmTXNSCC0v+cPV5vaUfoERgPyn13bxmNr/z7XofZILt GPHyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudekvddgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepueehffegfeeluedufefffeejieeugeegvdefgffhueetheeuheegieeftddu feehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Feb 2023 18:08:20 -0500 (EST) Message-ID: <78e58d62-f6a4-22e2-0bc2-df085c9a47c7@bsdio.com> Date: Thu, 23 Feb 2023 16:08:19 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Improve formatting of warning DEBUG in UsbSelectConfig To: "Wu, Hao A" , "devel@edk2.groups.io" , "Wang, Jian J" , "Gao, Liming" , "Ni, Ray" References: <20230221005133.1036115-1-rebecca@quicinc.com> <2488f931-b915-9282-65b3-5eb8d74c683d@bsdio.com> From: "Rebecca Cran" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thanks, I think that's a good format. I'll send out a v2 patch with more of lines updated. -- Rebecca Cran On 2/22/23 6:39 PM, Wu, Hao A wrote: > 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 >> Sent: Wednesday, February 22, 2023 7:43 PM >> To: devel@edk2.groups.io; Wu, Hao A ; Wang, Jian J >> ; Gao, Liming ; Ni, Ray >> >> 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 On Behalf Of >>>> Rebecca Cran >>>> Sent: Tuesday, February 21, 2023 8:52 AM >>>> To: devel@edk2.groups.io; Wang, Jian J ; Gao, >>>> Liming ; Wu, Hao A ; >>>> Ni, Ray >>>> Cc: Rebecca Cran >>>> 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 >>>> --- >>>> 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 >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>>