From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, quic_llindhol@quicinc.com
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [edk2-devel] [PATCH v2 1/8] ArmPlatformPkg/NorFlashDxe: Remove unused debug print specifier
Date: Fri, 2 Sep 2022 18:29:44 -0400 [thread overview]
Message-ID: <f43f5ec4-6f06-9f67-474a-0e8c95949fee@linux.microsoft.com> (raw)
In-Reply-To: <YwdLrVe16eMPayAn@qc-i7.hemma.eciton.net>
I updated V3 to repeat BufferSizeInBytes.
Regards,
Michael
On 8/25/2022 6:15 AM, Leif Lindholm wrote:
> On Wed, Aug 24, 2022 at 23:48:17 -0400, Michael Kubacki wrote:
>> From: Michael Kubacki <michael.kubacki@microsoft.com>
>>
>> These debug messages are repeated in both NorFlashBlockIoReadBlocks()
>> and NorFlashBlockIoWriteBlocks():
>>
>> "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x"
>> "bytes (%d kB), BufferPtr @ 0x%08x)\n"
>>
>> Although this requires 5 arguments, only 4 are provided. The kilobyte
>> value was never given.
>>
>> This change removes that specifier so the 4 arguments match the 4
>> specifiers in the debug macro.
>>
>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
>> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
>> ---
>> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c
>> index 5afab0a79fa2..e671108e2bcf 100644
>> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c
>> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c
>> @@ -54,7 +54,7 @@ NorFlashBlockIoReadBlocks (
>> Instance = INSTANCE_FROM_BLKIO_THIS (This);
>> Media = This->Media;
>>
>> - DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoReadBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes (%d kB), BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer));
>> + DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoReadBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes, BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer));
>>
>
> Line last touched 2013-01-25, which was a line ending fix on top of
> the creation of ArmPlatformPkg on 2011-02-01. I mean on the positive
> side, no one would appear to have needed to debug BLKIO since then.
>
> I'm not going to bikeshed, but I'm going to mention the bikeshedding
> point that the original mistake made was in not repeating
> BufferSizeInBytes in the argument list.
>
> Make of this what you will - either way
> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
>
>> if (!Media) {
>> Status = EFI_INVALID_PARAMETER;
>> @@ -89,7 +89,7 @@ NorFlashBlockIoWriteBlocks (
>>
>> Instance = INSTANCE_FROM_BLKIO_THIS (This);
>>
>> - DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes (%d kB), BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer));
>> + DEBUG ((DEBUG_BLKIO, "NorFlashBlockIoWriteBlocks(MediaId=0x%x, Lba=%ld, BufferSize=0x%x bytes, BufferPtr @ 0x%08x)\n", MediaId, Lba, BufferSizeInBytes, Buffer));
>>
>> if ( !This->Media->MediaPresent ) {
>> Status = EFI_NO_MEDIA;
>> --
>> 2.28.0.windows.1
>>
>>
>>
>>
>>
>>
>
>
>
>
next prev parent reply other threads:[~2022-09-02 22:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 3:48 [PATCH v2 0/8] Fix imbalanced debug macros Michael Kubacki
2022-08-25 3:48 ` [PATCH v2 1/8] ArmPlatformPkg/NorFlashDxe: Remove unused debug print specifier Michael Kubacki
2022-08-25 10:15 ` [edk2-devel] " Leif Lindholm
2022-09-02 22:29 ` Michael Kubacki [this message]
2022-08-25 3:48 ` [PATCH v2 2/8] FatPkg/FatPei: Remove extraneous debug message argument Michael Kubacki
2022-08-25 3:48 ` [PATCH v2 3/8] MdeModulePkg: Fix imbalanced debug macros Michael Kubacki
2022-08-25 3:48 ` [PATCH v2 4/8] RedfishPkg/RedfishRestExDxe: Remove extra debug macro argument Michael Kubacki
2022-08-25 3:48 ` [PATCH v2 5/8] SecurityPkg/SmmTcg2PhysicalPresenceLib: Add missing debug print specifier Michael Kubacki
2022-08-25 6:02 ` Yao, Jiewen
2022-08-25 3:48 ` [PATCH v2 6/8] DynamicTablesPkg/AcpiPpttLibArm: Fix debug macro arguments Michael Kubacki
2022-09-01 10:42 ` Sami Mujawar
2022-08-25 3:48 ` [PATCH v2 7/8] NetworkPkg/TcpDxe: " Michael Kubacki
2022-09-02 14:30 ` Maciej Rabeda
2022-08-25 3:48 ` [PATCH v2 8/8] OvmfPkg/LegacyBootManagerLib: " Michael Kubacki
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=f43f5ec4-6f06-9f67-474a-0e8c95949fee@linux.microsoft.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