diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-11-14 10:23:33 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2014-11-14 10:23:33 +0000 |
commit | 1c5901528147af6f2d095a7b7d4bb73e19eeb365 (patch) | |
tree | 5b04f9e669a52e59df79279bab4b488a64b1c6ff /Omap35xxPkg/SmbusDxe | |
parent | 1e62c89c3ae0da2eeabb37c5ab299b928ebbbb30 (diff) | |
download | edk2-1c5901528147af6f2d095a7b7d4bb73e19eeb365.tar.gz edk2-1c5901528147af6f2d095a7b7d4bb73e19eeb365.tar.bz2 edk2-1c5901528147af6f2d095a7b7d4bb73e19eeb365.zip |
OvmfPg: flash driver: drop gratuitous 64-by-32 bit divisions (VS2010)
In the InitializeVariableFvHeader() function, all three of "Offset",
"Start" and "BlockSize" have type UINTN. Therefore the (Offset /
BlockSize) and (Start / BlockSize) divisions can be compiled on all
platforms without intrinsics.
In the current expressions
(EFI_LBA) Offset / BlockSize
(EFI_LBA) Start / BlockSize
"Offset" and "Start" are cast to UINT64 (== EFI_LBA), which leads to
64-by-32 bit divisions on Ia32, breaking the VS2010 / NOOPT / Ia32 build.
The simplest way to fix them is to realize we don't need casts at all.
(The prototypes of QemuFlashEraseBlock() and QemuFlashWrite() are visible
via "QemuFlash.h", and they will easily take our UINTN quotients as
UINT64.)
Suggested-by: Scott Duplichan <scott@notabs.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16383 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Omap35xxPkg/SmbusDxe')
0 files changed, 0 insertions, 0 deletions