audk/ArmPlatformPkg/Drivers
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
..
ArmTrustZone ArmPlatformPkg/TZASC: Allow specifying subregions to be disabled 2017-01-26 14:31:37 +00:00
LcdGraphicsOutputDxe ArmPlatformPkg/HdLcd: add missing LcdIdentify() 2015-09-04 10:02:43 +00:00
NorFlashDxe ArmPlatformPkg/NorFlashDxe: correct NumOfLba vararg type in EraseBlocks() 2017-05-18 23:18:05 +02:00
PL011Uart ArmPlatformPkg: Correct mendacious comments. 2016-10-11 14:23:41 +01:00
PL34xDmc ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
PL35xSmc ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
PL061GpioDxe ArmPlatformPkg/PL061Gpio: fix the offset value in Get function 2017-02-16 11:31:25 +00:00
PL180MciDxe ArmPlatformPkg/PL180MciDxe: update for identifying SD 2016-11-24 16:29:03 +00:00
PL301Axi ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
PL310L2Cache ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
SP804TimerDxe ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
SP805WatchdogDxe ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00