From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.4668.1662157785556252662 for ; Fri, 02 Sep 2022 15:29:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Ehm4tio2; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.195.228.134]) by linux.microsoft.com (Postfix) with ESMTPSA id C605920477A6; Fri, 2 Sep 2022 15:29:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C605920477A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1662157785; bh=0Uwdn9ipfv6vmIWsa/Y18kcvej4hQdKvYBHa+S/giMc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ehm4tio2zFauUzxFYo4sV23qqTVnm17ErWJbQal7fks0lwbJ6kaHDiRp8U/i3FUsA dtrqjufcJyojT2gJCL+sZcn3duRO4tOiNQvPx8K4nRf559PzkOwa8S27mhRxhMIlGa v/YBZN4Tj1nqPAaDBqIH+gydyghm24FjpLElmaZo= Message-ID: Date: Fri, 2 Sep 2022 18:29:44 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [edk2-devel] [PATCH v2 1/8] ArmPlatformPkg/NorFlashDxe: Remove unused debug print specifier To: devel@edk2.groups.io, quic_llindhol@quicinc.com Cc: Ard Biesheuvel , Ard Biesheuvel References: <20220825034824.4044-1-mikuback@linux.microsoft.com> <20220825034824.4044-2-mikuback@linux.microsoft.com> From: "Michael Kubacki" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 >> >> 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 >> Cc: Ard Biesheuvel >> Signed-off-by: Michael Kubacki >> Reviewed-by: Ard Biesheuvel >> --- >> 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 > >> 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 >> >> >> >> >> >> > > > >