public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Wei, David" <david.wei@intel.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>
Subject: Re: [PATCH 8/8] Vlv2TbltDevicePkg/FvbRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
Date: Fri, 26 May 2017 18:55:48 +0200	[thread overview]
Message-ID: <e8c2a980-7140-ed3e-d802-52ef8f34ae9b@redhat.com> (raw)
In-Reply-To: <89954A0B46707A448411A627AD4EEE3468F328E4@SHSMSX101.ccr.corp.intel.com>

David,

On 05/19/17 03:49, Wei, David wrote:
> Reviewed-by: zwei4 <david.wei@intel.com> 
> 
> 
> Thanks,
> David  Wei                                 

thanks for committing & pushing this patch on my behalf -- I've been
waiting for the rest of the reviews to trickle in. I figured I'd push
the DuetPkg, Nt32Pkg, QuarkPlatformPkg and Vlv2TbltDevicePkg patches in
one go. The first two of these remain unreviewed (by the package
maintainer), which is why I haven't pushed the QuarkPlatformPkg and
Vlv2TbltDevicePkg patches either.

Thanks,
Laszlo

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com] 
> Sent: Thursday, May 18, 2017 11:04 PM
> To: edk2-devel-01 <edk2-devel@lists.01.org>
> Cc: Wei, David <david.wei@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Guo, Mang <mang.guo@intel.com>
> Subject: [PATCH 8/8] Vlv2TbltDevicePkg/FvbRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
> 
> According to the PI spec, Volume 3,
> EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.EraseBlocks():
> 
>> The variable argument list is a list of tuples. Each tuple describes a
>> range of LBAs to erase and consists of the following:
>> * An EFI_LBA that indicates the starting LBA
>> * A UINTN that indicates the number of blocks to erase
> 
> (NB, in edk2, EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL is a typedef to
> EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.)
> 
> In this driver, the NumOfLba local variable is defined with type UINTN,
> but the TYPE argument passed to VA_ARG() is UINT32. Fix the mismatch.
> 
> Cc: David Wei <david.wei@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Mang Guo <mang.guo@intel.com>
> Reported-by: Jordan Justen <jordan.l.justen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     unbuilt, untested
> 
>  Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c | 4 ++--
>  Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.c  | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> index b0013f918368..89b941042420 100644
> --- a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> +++ b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> @@ -793,7 +793,7 @@ FvbProtocolEraseBlocks (
>        break;
>      }
>  
> -    NumOfLba = VA_ARG (args, UINT32);
> +    NumOfLba = VA_ARG (args, UINTN);
>  
>      //
>      // Check input parameters.
> @@ -817,7 +817,7 @@ FvbProtocolEraseBlocks (
>        break;
>      }
>  
> -    NumOfLba = VA_ARG (args, UINT32);
> +    NumOfLba = VA_ARG (args, UINTN);
>  
>      while ( NumOfLba > 0 ) {
>        Status = FvbEraseBlock (FvbDevice->Instance, StartingLba);
> diff --git a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.c b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.c
> index 20aaf8720f72..22a4bdcdd492 100644
> --- a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.c
> +++ b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.c
> @@ -725,7 +725,7 @@ FvbEraseBlocks (
>        break;
>      }
>  
> -    NumOfLba = VA_ARG (Marker, UINT32);
> +    NumOfLba = VA_ARG (Marker, UINTN);
>      if (NumOfLba == 0) {
>        return EFI_INVALID_PARAMETER;
>      }
> @@ -742,7 +742,7 @@ FvbEraseBlocks (
>      if (StartingLba == EFI_LBA_LIST_TERMINATOR ) {
>        break;
>      }
> -    NumOfLba = VA_ARG (Marker, UINT32);
> +    NumOfLba = VA_ARG (Marker, UINTN);
>      Status = EraseBlock (This, StartingLba, NumOfLba);
>      if (EFI_ERROR (Status)) {
>        break;
> 



      reply	other threads:[~2017-05-26 16:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 15:04 [PATCH 0/8] several Pkgs: FVB driver: correct NumOfLba vararg type in EraseBlocks() Laszlo Ersek
2017-05-18 15:04 ` [PATCH 1/8] ArmPlatformPkg/NorFlashDxe: " Laszlo Ersek
2017-05-18 15:12   ` Ard Biesheuvel
2017-05-18 17:21   ` Jordan Justen
2017-05-18 19:29     ` Laszlo Ersek
2017-05-18 20:44       ` Jordan Justen
2017-05-19 10:07         ` Leif Lindholm
2017-05-19 16:59           ` Jordan Justen
2017-05-22 17:50             ` Leif Lindholm
2017-05-18 22:11   ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 2/8] DuetPkg/FvbRuntimeService: " Laszlo Ersek
2017-05-24 15:51   ` Laszlo Ersek
2017-05-27  0:54   ` Wu, Hao A
2017-05-29 12:45     ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 3/8] EmulatorPkg/FvbServicesRuntimeDxe: " Laszlo Ersek
2017-05-18 22:11   ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 4/8] Nt32Pkg/FvbServicesRuntimeDxe: " Laszlo Ersek
2017-05-24 15:52   ` Laszlo Ersek
2017-05-27  0:54   ` Wu, Hao A
2017-05-29 12:45     ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 5/8] OvmfPkg/EmuVariableFvbRuntimeDxe: " Laszlo Ersek
2017-05-18 22:11   ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 6/8] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: " Laszlo Ersek
2017-05-18 22:12   ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 7/8] QuarkPlatformPkg/SpiFvbServices: " Laszlo Ersek
2017-05-24 15:53   ` Laszlo Ersek
2017-05-24 16:52   ` Kinney, Michael D
2017-05-29 12:45     ` Laszlo Ersek
2017-05-18 15:04 ` [PATCH 8/8] Vlv2TbltDevicePkg/FvbRuntimeDxe: " Laszlo Ersek
2017-05-19  1:49   ` Wei, David
2017-05-26 16:55     ` Laszlo Ersek [this message]

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=e8c2a980-7140-ed3e-d802-52ef8f34ae9b@redhat.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