audk/ArmPlatformPkg
Laszlo Ersek ce69cc776c ArmPlatformPkg/NorFlashDxe: 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.

In addition, update the DEBUG macro invocation where NumOfLba is formatted
with the %d conversion specifier: UINTN values should be converted to
UINT64 and printed with %Lu or %Lx for portability between 32-bit and
64-bit.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-05-18 23:18:05 +02:00
..
ArmJunoPkg ArmPlatformPkg/ArmJunoDxe: simplify ACPI table installation 2017-04-05 16:01:14 +01:00
ArmVExpressPkg ArmPlatformPkg/ArmVExpressDxe: remove FDT handling from ArmFvpDxe 2017-04-11 18:23:17 +01:00
Documentation ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
Drivers ArmPlatformPkg/NorFlashDxe: correct NumOfLba vararg type in EraseBlocks() 2017-05-18 23:18:05 +02:00
FileSystem/BootMonFs ArmPlatformPkg/BootMonFs: eliminate deprecated string functions 2016-10-28 15:56:13 +01:00
Include ArmPlatformPkg,ArmVirtPkg: delete redundant PL031 functions 2017-05-10 14:28:37 +01:00
Library ArmPlatformPkg,ArmVirtPkg: delete redundant PL031 functions 2017-05-10 14:28:37 +01:00
MemoryInitPei ArmPlatformPkg: remove EFI_MEMORY_UC attribute from normal memory 2016-09-08 10:35:33 +01:00
PlatformPei ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
PrePeiCore ArmPkg ArmPlatformPkg ArmVirtPkg: ARM GICv2/v3 Base Address width fix-up 2016-09-08 09:16:01 +01:00
PrePi ArmPlatformPkg/PrePi RVCT: use relative reference to mSystemMemoryEnd 2016-10-28 16:26:15 +01:00
Scripts ArmPlatformPkg/DS-5: fix 64-bit PE/COFF header parsing bug 2016-04-18 10:18:14 +02:00
ArmPlatformPkg.dec ArmPlatformPkg: change PcdBdsLinuxSupport default value 2016-08-04 14:32:19 +01:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00